Archive Router’s configuration on Cisco IOS

The Configuration Archive is simple and powerful feature:
every time the router operator requests it (or periodically, if configured), the router stores its current configuration (on an external storage).

The external file names can include router name, configuration date-and-time, as well as a configuration version number.

Archived configurations can be stored using all file transfer protocol router’s IOS release supports (FTP, RCP, TFTP, HTTP, HTTPS or SCP), or on Class C flash systems, internal drives, or USB drives.

The Configuration Archive feature is started with the path configuration command (within the archive configuration section) that specifies the path to archive (internal or external).
Additional configuration options (maximum, time-period and write-memory) fine-tune the archiving operation.

 

Whenever a Configuration Archive is requested, the router performs the following tasks:

  1. Textual representation of the current running configuration is generated (as with the show running-config command).
  2. The current backup version number is appended to the specified file path.
  3. The router tries to store the running configuration to the calculated (local or remote) file name.

 

If the archiving operation has been successful, the router saves the archive file name in an internal circular buffer (up to 14 entries long).

  1. The backup version number is incremented by one.
  2. The Configuration Archive request can be triggered from three sources:
  3. Manually with the archive config command.
  4. Periodically every N minutes if you’ve configured the time-period (regardless of whether there has been any change in the running configuration).
  5. Whenever the running configuration is stored into NVRAM with the write memory command or its equivalent.

 

Here is an example (extracted from a production router) to backup the configuration via File Transfer over SSH (SCP) periodically and when configuration is copied on startup-config by user:

!
archive
path scp://username:password@hostname/path
write-memory
time-period 86400
!

Comments are closed.