Archive your Configuration
It is important to save your router and switch configuration but what happens if the device fails or if you saved a configuration mistake, without having to manually worry about it? Well if your Cisco router or switch has Cisco IOS 12.3T and higher you would be able to set up an auto archive within the flash memory of the unit or you can send that configuration file to a server that does either FTP, HTTP, SCP. TFTP, etc. Let's work through on setting up the archive feature on a Cisco Router.
In this example we will look at one way to archive your configuration to the flash memory of the unit. This is good if you want the ability to revert back quickly to an existing configuration that has been saved in flash. Keep in mind this is not the only way to archive your configuration, instead of archiving it to flash memory you could back it up on a server using some common transfer file protocol like FTP, TFTP and other options. Let's start setting up the archive feature so I'm on the HQ Router and to archive to flash, the first thing we have to do is enter configuration mode followed by typing archive and hit enter.
HQ#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
HQ(config)#archive
HQ(config-archive)#
HQ(config-archive)#?
Archive configuration commands:
default Set a command to its defaults
exit Exit from archive configuration mode
log Logging commands
maximum maximum number of backup copies
no Negate a command or set its defaults
path path for backups
rollback Rollback parameters
time-period Period of time in minutes to automatically archive the
running-config
write-memory Enable automatic backup generation during write memory
HQ(config-archive)#path flash:HQ-RTR.config
HQ(config-archive)#write-memory
HQ(config-archive)#time-period 500000
HQ#show archive
There are currently 3 archive configurations saved.
The next archive file will be named flash:HQ-RTR.config-3
Archive # Name
0
1 flash:HQ-RTR.config-1
2 flash:HQ-RTR.config-2
3
4
5
6
7
8
9
10
11
12
13
14
HQ#show flash:
-#- --length-- -----date/time------ path
1 19939672 Sep 16 2008 15:51:54 +00:00 c1841-spservicesk9-mz.124-6.T7.bin
2 1122 Jan 22 2013 03:49:18 +00:00 HQ-RTR.config-1
3 1142 Jan 22 2013 03:54:28 +00:00 HQ-RTR.config-2
HQ#configure replace archive:flash:HQ-RTR.config-2
This will apply all necessary additions and deletions
to replace the current running configuration with the
contents of the specified configuration file, which is
assumed to be a complete configuration, not a partial
configuration. Enter Y if you are sure you want to proceed. ? [no]: Y
HQ#
Related articles
- Configure DHCP on a Cisco Router (ryansrealm.com/ciscoskills)
- How to Remove Tracked Interface from HSRP (rekrowten.wordpress.com)
- SFTP/FTP Password Exposure via sftp-config.json (sucuri.net)