Cisco IOS (originally Internetwork Operating System) is software used on most Cisco Systems routers and current Cisco network switches. (Earlier switches ran CatOS.) IOS is a package of routing, switching, internetworking and telecommunications functions integrated into a multitasking operating system.
You have a Cisco switch and/or router? Everything is running just fine until one day you get a hardware failure and you need to replace it!
You think it’s easy replacing it, well it is if you have the latest configuration backed up. You can do it manually each time you change the configuration or do it automatically as follow.
Remember a good admin is a lazy admin 😀 :D!
Cisco provide us with the “archive” command allows you to create a copy of your configuration manually, periodically, or when the configuration is stored in NVRAM via FTP, TFTP, HTTP, SCP or RCP.
|12.3(4)T||This command was introduced.|
|12.2(25)S||This command was integrated into Cisco IOS Release 12.2(25)S.|
|12.2(33)SRA||This command was integrated into Cisco IOS Release 12.2(33)SRA.|
|12.2(33)SB||This command was integrated into Cisco IOS Release 12.2(33)SB and implemented on the Cisco 10000 series.|
In this example, we are going to save a copy via FTP of the IOS configuration every time the “write memory” command is issued.
First we are going to configure the username and password of the FTP
Router(config)# ip ftp username USERNAME
Router(config)# ip ftp password PASSWORD
Replacing “USERNAME” by the FTP username and “PASSWORD” by the FTP password.
Now execute the command “archive”
Router(config-archive)# path ftp://192.168.0.100/$h
192.168.0.100 is the FTP IP address, $h in the path will use the hostname of the IOS system when naming the backup file. The “write-memory” command will cause the archives to be launched each time it is used.
To test it out use either of the command bellow
Router# write memory
Router# archive config
If you want to make the backup periodically, you can use “time-period” followed by the number of minutes like this
Router(config-archive)# time-period 10080
To see a list of archives use this command
Router# show archive
Now that we have configured the backup, what if one day you do a bad command and you need to restore an old backed up configuration?
Router# configure replace ftp://192.168.0.100/Switch-1
This will replace your current configuration by “Switch-1” from the FTP server.
Hope this helps you be more lazy 😉