Cisco Nexus: Scheduled Backup

Create Backup-Script on nexus
nexus> enable
nexus# echo "copy running-config tftp://ipaddress-of-tftp-server/$(SWITCHNAME)_$(TIMESTAMP) vrf default" >> scheduledbkp

Maybe you need to use another vrf. This depends on what vrf you configure on your Management-VLAN-Interface

Create Task using Embedded Event Manager (EEM)
nexus> enable
nexus# conf t
nexus(config)# event manager applet scheduled_backup
nexus(config-applet)# event snmp oid get-type exact entry-op le entry-val 12345 poll-interval 86400
nexus(config-applet)# action 1.0 cli command enable
nexus(config-applet)# action 2.0 run-script bootflash:scheduledbkp
nexus(config-applet)# action 3.0 priority notifications msg auto-backup_completed
nexus(config-applet)# end
nexus# copy running-config startup-config
nexus# exit
  • snmp oid check CPU-Load
  • entry-val 12345: if CPU-Load is below 12345%
  • poll-interval 86400: run actions every 86400 seconds

On Windows use Solarwinds TFTP Server as it can run as service

Leave a Reply

Your email address will not be published. Required fields are marked *