IOS Tips and Tricks, Part 7

With the current IOS you can archive the running config. To create an archive, enter archive configuration mode and specify the target for the archived files. For example, if you’d like to place the archive on a TFTP server at using the filename Alex, you would do this:

Router(config-archive)#path tftp://

This adds an archive section to the running config:

Router#show run | section archive
path tftp://

Once the archive path has been configured, you can manually trigger archive sends from privileged mode:

Router#archive config

The archive entries will be assigned increasing revision numbers as they are created. If the filename specified was Alex, the individual archive entries will have the names Alex-1, Alex-2, etc. You can view the archive history using show archive:

Router#show archive

The next archive file will be named tftp://

Archive #  Name
1       tftp://
2       tftp://
3       tftp://
4       tftp:// <- Most Recent

You can configure the device to do an automatic archive send whenever the running config is saved to NVRAM by using the write-memory option:

Router(config-archive)#path tftp://

You can also configure the device to archive the running config at periodic intervals. For example, to archive the running config every hour (which is most likely overkill), you would do this:

Router#conf t
Router(config-archive)#path tftp://
Router(config-archive)#time-period 60

If desired, you can combine the various triggering modes. Now that we have some configs archived, we can use them to roll back the running config. For example, to roll back to the archive file “Alex-3” that’s residing on the TFTP at, we would do this:

Alex#configure replace tftp://

We can also tell the device to log all changes made to the running config, like this:

Router(config-archive)#log config
Router(config-archive-log-cfg)#logging enable

Now, let’s make some changes to the running config:

Router#conf t
Router(config)#int loop 99
Router(config-if)#ip addr

To view the logging buffer and see the changes, use “show archive log config all” from privileged mode:

Router#show archive log config all
idx   sess           user@line      Logged command
1     1        console@console  |  logging enable
2     2        console@console  |interface loop 99
3     2        console@console  | ip address

In this article

Join the Conversation


  1. Josh Reply

    Something of interest. The path command will take host and time variables. So your example of
    Router(config-archive)#path tftp://$h-$t.cfg
    will produce a file Router-Jan-14-07-50-49.cfg-0
    You also have several file transfer options with the path including ftp.

  2. sebastien Reply

    Let’s say i set the maximum number of archive to 5 , what’s going to happen when i will perform a new backup.
    Will the first backup tftp:// be overwrited ?


  3. Al Friebe Reply

    Sorry for the delay, been busy!

    Josh: When I tried using the date and time variables, the Solar Winds TFTP server gave an error due to “bad characters in the path”.

    Sebastian: If your device is equipped with “Disk0” or some such file system (a flash memory ATA disk), that’s what happens. If you are writing to a network device (such as a TFTP server), if you try to set a maximum you get the message “Cannot set maximum when backing up to network path”.