cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1166
Views
0
Helpful
4
Replies

Automated backup of Cisco N3K running config on file server

kumaravinash
Level 1
Level 1

Hi 

I have just installed two Nexus 3524 switches in my network and want to configure Automated Running config backup on a file server. 

Kindly help me that how can i configure the automatic schedule backup on Nexus switches.

Thanks

Avinash

4 Replies 4

Mark Malone
VIP Alumni
VIP Alumni

Hi

so theres no kron no archive in nx-os , you can use DCNM but its very expensive , other otion is prime can backup aswell nx-os to multiple locations or some other 3rd party software

the only other way I know how to do it locally on the device is through EEM , we backup to flash twice a day with it but you could alter the  script I use below to send to a tftp server instead of bootflash , the oid is for nexus , works on 5ks and 7ks haven't tested it yet on 3ks but should work

event manager applet NX-OS_Configuration_Backup
  event snmp oid 1.3.6.1.4.1.9.9.109.1.1.1.1.6.1 get-type exact entry-op le entry-val 12345 poll-interval 43200
  action 1.0 cli command enable
  action 2.0 cli copy run bootflash:NX-OS_Latest_Running_Config_Backup
  action 3.0 syslog priority notifications msg Running_Config_Backup_Complete

Hi Mark

I want to store the backup file on a file server automatically. can we get the same from above solution?

Thanks

Avinash

Yes what the OID is doing is allowing the eem capturing the running config and it set for every 12 hours the poll interval and then the actions in the eem will send it to your server you can change the eem to send to a ftp server or tftp whatever instead of the local bootflash storage  , I haven't tested the oid in 3ks but it works fine in 7s and 5s

Since an automated backup cannot be initiated from the Nexus 3K, here
are some options for a 3rd party application or cron job.
1st option:

you can use ssh and scp to remotely execute NXOS commands sent from

the host to pull/push files to/from the N3K.

 Preconfigure the ssh key on the N3K for authenitcation.

 Then something like this on the host that is doing the backup of the N3k

 Host$ ssh n3k_sw scp startup-config

username@Host:/home/username/N3k_configs/startup-config-xxx

 Host$ ssh n3k_sw scp

username@Host:/home/username/N3k_configs/startup-config-xxx bootflash:

 2nd option:

you can configure snmp for this automatic backup

 You can use following snmp-set commands

 
snmpset -v 2c -c private 14.17.151.64 .1.3.6.1.4.1.9.9.96.1.1.1.1.14.135
integer 5

 
snmpset -v 2c -c private 14.17.151.64 .1.3.6.1.4.1.9.9.96.1.1.1.1.2.135
integer 1

 
snmpset -v 2c -c private 14.17.151.64 .1.3.6.1.4.1.9.9.96.1.1.1.1.3.135
integer 4

 
snmpset -v 2c -c private 14.17.151.64 .1.3.6.1.4.1.9.9.96.1.1.1.1.4.135
integer 1

 
snmpset -v 2c -c private 14.17.151.64 .1.3.6.1.4.1.9.9.96.1.1.1.1.5.135
a "172.18.252.233"

 
snmpset -v 2c -c private 14.17.151.64 .1.3.6.1.4.1.9.9.96.1.1.1.1.6.135
s "test1"

 
snmpset -v 2c -c private 14.17.151.64 .1.3.6.1.4.1.9.9.96.1.1.1.1.14.135
integer 1

 
Substitute your ip addrs and snmp v2 community strings or v3 as
appropriate

 snmpset -v 2c -c private 14.17.151.64 .1.3.6.1.4.1.9.9.96.1.1.1.1.3.135
integer 4  (running config)

 snmpset -v 2c -c private 14.17.151.64 .1.3.6.1.4.1.9.9.96.1.1.1.1.3.135
integer 3  (startup config)