cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
38343
Views
20
Helpful
14
Replies

Automating Backup of configuration Cisco Nexus 5 and 7k's

thekid1970
Level 1
Level 1

Hello

I need some help regarding automating the backup of configuration of Nexus 5 and 7k's. What are people doing regarding this situation? 

Thoughts?

Thanks,

1 Accepted Solution
14 Replies 14

Jerry Ye
Cisco Employee
Cisco Employee

You can try DCNM or Ciscoworks LMS.

Regards,

jerry

Jerry,

I did do some reading on DCNM.... I was just wondering if you could have place some scripts to go to a tftp,scp etc to a server? I know in IOS on cisco routers/switches you can setup kron jobs/archive to do this... it appears nexus OS dont have those commands.

Any feedback would be appreciated.

Thanks,

John

Kron is not available in NXOS, you try EEM on the 7K (EEM is not available on the 5K). Here are some of the example

http://www.cisco.com/en/US/docs/switches/datacenter/sw/5_x/nx-os/system_management/configuration/guide/sm_eem_events_and_examples.html

HTH,

jerry

Jerry,

thanks with your quick response. so with that said, if eem is not available on the 5k's would you just go ahead and configure a server with dcnm on it and go that route?

i do have 2 7k's and 6 5k's in our data center.

Thanks,

Jerry, thanks for all your help. i will go DCNM way.

I use cacti, with the router configs plugin. The config needed a bit of tweaking to recognise the nexus itself, but once that was done, and a little alteration to the default script, all it has to do is a

copy run tftp://%SERVER%/%FILE% vrf management vdc-all

The cacti plugin then replaces %SERVER% and %FILE% with the appropriate values (On detecting NX-OS base context), and away it runs.

H

Hamish,

i appreciate your input. since i have a bunch of NX-OS devices, i will just go ahead and utilize DCNM.

Thanks,

edwardzeng
Level 1
Level 1

You don't need DCNM to do this job.

you can config the schedule to do that for you.

 

============= Example =========

scheduler job name Backup-Weekly
copy running-config tftp://192.168.x.y/$(SWITCHNAME)-conf.$(TIMESTAMP) vrf management vdc-all

scheduler schedule name Backup-Weekly
  job name Backup-Weekly
  time weekly 06:23:50

============================

Then after that you can run this command to verify it.

=========================

show scheduler schedule

 

After that you can check with this command too:

=====================

sh scheduler logfile

 

`copy running-config tftp://192.168.x.y/hostname-conf.2014-09-19-14.50.00 vrf management vdc-all `
Connection to Server Established.
[                         ]         0.50KBTrying to connect to tftp server......
[######                   ]        24.50KB
[############             ]        48.50KB
[##################       ]        68.50KB
TFTP put operation was successful
Copy complete.

 

 

there is no scheduler on my n5k:

(config)# sch?
^
% Invalid command at '^' marker.

Did you enable feature scheduler ?

no such feature in 5.2(1)

Does anyone know if there is a way to activate the scheduler when doing a config save ? With the archive feature you have this option (but archive doesn't support scp)

Thx

 

ninel
Level 1
Level 1

I had the same problem and solve it with a alias and a EEM

We have Nexus9000 with NXOS version 9.3

 

conf t
cli alias name wr copy running-config startup-config ; event manager run ARCHIVE_CONFIG

event manager environment new_archive_file "$(SWITCHNAME)-$(TIMESTAMP).cfg"
event manager applet ARCHIVE_CONFIG
  action 10 syslog msg Archiving running-config to FTP server.
  action 20 cli copy running-config ftp://<USER>:<PASSWORD>@10.1.1.1/FTP_PATH/$new_archive_file



Now each time you enter 'wr' it will save the config and also make a new backup, similar to IOS archive configuration

It will also generate a new unique filename for each file based on device name and timestamp.

 

Hope this will help others as well...

 

Cheers!

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card