Friday, December 23, 2011

Backup a Cisco Config Automatically – Changes ( Archive Method )

Cisco IOS has the ability to save it’s configuration when you run the write memory command.
Here is how:

R1#enable
R1#configure terminal
R1(config)#archive
R1(config-archive)#path tftp://172.16.10.61/sw3725/sw3725.cfg
R1(config-archive)#write-memory
R1(config-archive)#exit
R1(config)#exit

The “write-memory” option means that when the running-config is saved to the startup-config a copy will also be saved on the tftp server, thus backing up the startup-config every time it’s changed.

In this example, we’ve configured the switch to save to the configuration file to the sw3725 sub-directory of a ttp server.
To test the setup, run the “write memory” command.

R1#enable
R1#write memory

or
R1#copy running-config startup-config

Looking on the sw3725 on the tftp server, we see a configuration file was uploaded:

sw3725.cfg-1

if you save the running-config a couple more times you wil get something like this:

sw3725.cfg-1
sw3725.cfg-2
sw3725.cfg-3

like you see the number at the end of the file name is incremented, every time you save the running-config

Based On: http://www.rainingpackets.com/configuring-cisco-ios-automatically-save-running-configuration-tftp-server-save

More Info at:

No comments: