Configuration Archiving
Problem
You want to automatically maintain an archive of router configuration files.
Solution
To create an archive of old configuration files, use the following set of commands:
Router1#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router1(config)#archiveRouter1(config-archive)#pathRouter1(config-archive)#slot0:/configs/$hwrite-memoryRouter1(config-archive)#time-periodRouter1(config-archive)#1440endRouter1#
Discussion
Starting with IOS Version 12.3(4)T, Cisco introduced the ability to archive IOS configuration files. Once the feature is enabled, the router’s configuration is stored in the archive each time you issue a write memory or copy running-config startup-config. In our example, we chose to save the archive configuration files on the flash card in slot0; however, you can also store the configuration files remotely using such protocols as TFTP.
Before the router can store the files in the location we’ve
configured, we first need to create the directory configs. You don’t need to store the archive
files within a directory, but it’s a good idea to keep the archive
files together and away from other files such as IOS images. To create
a directory in flash, use the mkdir command:
Router1#cdRouter1#slot0:mkdirCreate directory filename [configs]?configs<enter>Created dir slot0:/configs Router1#
Once the directory is created, the router will begin to automatically store its router configuration files each time you save ...