Skip to Content
Cisco IOS Cookbook, 2nd Edition
book

Cisco IOS Cookbook, 2nd Edition

by Kevin Dooley, Ian Brown
December 2006
Intermediate to advanced
1188 pages
72h 8m
English
O'Reilly Media, Inc.
Content preview from Cisco IOS Cookbook, 2nd Edition

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 terminal 
Enter configuration commands, one per line.  End with CNTL/Z.
Router1(config)#archive
Router1(config-archive)#path slot0:/configs/$h
Router1(config-archive)#write-memory
Router1(config-archive)#time-period 1440
Router1(config-archive)#end
Router1#

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#cd slot0:
Router1#mkdir configs
Create directory filename [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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

IP Routing on Cisco IOS, IOS XE, and IOS XR: An Essential Guide to Understanding and Implementing IP Routing Protocols

IP Routing on Cisco IOS, IOS XE, and IOS XR: An Essential Guide to Understanding and Implementing IP Routing Protocols

Brad Edgeworth, Aaron Foss, Ramiro Garza Rios
Cisco Software-Defined Access

Cisco Software-Defined Access

Srilatha Vemula, Jason Gooley, Roddie Hasan

Publisher Resources

ISBN: 0596527225Supplemental ContentErrata Page