- Managing Configuration Files
- Exclusive Configuration Change Access and Access Session Locking
- Configuration Replace and Configuration Rollback
- Configuration Rollback Confirmed Change
- Contextual Configuration Diff Utility
- Configuration Change Notification and Logging
- Configuration Logger Persistency
- Config Logger Enhancements for EAL4+ Certification
- Configuration Partitioning
- Configuration Versioning
- Parser Concurrency and Locking Improvements
- Parser Cache
Configuration Versioning
The Configuration Versioning feature allows you to maintain and manage backup copies of the Cisco running configuration on or off the device. The Configuration Replace feature uses the Configuration Versioning feature to provide a rollback to a saved copy of the running configuration.
- Finding Feature Information
- Information About Configuration Versioning
- How to Configure Configuration Versioning
- Configuration Examples for Configuration Versioning
- Additional References
- Feature Information for Configuration Versioning
Finding Feature Information
Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.
Information About Configuration Versioning
Configuration Archive
The Cisco configuration archive provides a mechanism to store, organize, and manage an archive of Cisco configuration files to enhance the configuration rollback capability provided by the configure replace command. Before this feature was introduced, you could save copies of the running configuration using the copy running-config destination-url command, storing the replacement file either locally or remotely. However, this method lacked any automated file management. With the Configuration Replace and Configuration Rollback feature, you can automatically save copies of the running configuration to the configuration archive. These archived files serve as checkpoint configuration references and can be used by the configure replace command to revert the configuration to a previous state.
The archive config command allows you to save Cisco configurations in the configuration archive using a standard location and filename prefix that is automatically appended with an incremental version number (and optional time stamp) as each consecutive file is saved. This functionality provides consistent identification of saved configuration files. You can specify how many versions of the running configuration are kept in the archive. After the maximum number of files are saved in the archive, the oldest file is automatically deleted when the next, most recent file is saved. The show archive command displays information for all configuration files saved in the configuration archive.
The configuration archive, in which the configuration files are stored and available for use with the configure replace command, can be located on the following file systems depending on your platform:
How to Configure Configuration Versioning
- Configuring the Characteristics of the Configuration Archive
- Monitoring and Troubleshooting the Configuration
Configuring the Characteristics of the Configuration Archive
Before using the archive config command, the configuration archive must be configured. Perform this task to configure the characteristics of the configuration archive.
1.
enable
2.
configure terminal
3.
archive
4.
path
url
5.
maximum
number
6.
time-period
minutes
7.
end
8.
archive config
DETAILED STEPS
Monitoring and Troubleshooting the Configuration
1.
enable
2.
show archive
3.
debug archive versioning
4.
debug archive config timestamp
5.
exit
DETAILED STEPS
Step 1 |
enable
Use this command to enable privileged EXEC mode. Enter your password if prompted. For example: Example: Device> enable Device# |
Step 2 |
show archive
Use this command to display information about the files saved in the configuration archive. For example: Example: Device# show archive There are currently 1 archive configurations saved. The next archive file will be named bootflash:myconfig-2 Archive # Name 0 1 bootflash:myconfig-1 <- Most Recent 2 3 4 5 6 7 8 9 10 11 12 13 14 The following is sample output from the show archive command after several archive files of the running configuration have been saved. In this example, the maximum number of archive files to be saved is set to three. Example: Device# show archive There are currently 3 archive configurations saved. The next archive file will be named bootflash:myconfig-8 Archive # Name 0 1 :Deleted 2 :Deleted 3 :Deleted 4 :Deleted 5 bootflash:myconfig-5 6 bootflash:myconfig-6 7 bootflash:myconfig-7 <- Most Recent 8 9 10 11 12 13 14 |
Step 3 |
debug archive versioning
Use this command to enable debugging of the configuration archive activities to help monitor and troubleshoot configuration replace and rollback. For example: Example: Device# debug archive versioning Jan 9 06:46:28.419:backup_running_config Jan 9 06:46:28.419:Current = 7 Jan 9 06:46:28.443:Writing backup file bootflash:myconfig-7 Jan 9 06:46:29.547: backup worked |
Step 4 |
debug archive config timestamp
Use this command to enable debugging of the processing time for each integral step of a configuration replace operation and the size of the configuration files being handled. For example: Example: Device# debug archive config timestamp Device# configure replace bootflash:myconfig force Timing Debug Statistics for IOS Config Replace operation: Time to read file slot0:sample_2.cfg = 0 msec (0 sec) Number of lines read:55 Size of file :1054 Starting Pass 1 Time to read file system:running-config = 0 msec (0 sec) Number of lines read:93 Size of file :2539 Time taken for positive rollback pass = 320 msec (0 sec) Time taken for negative rollback pass = 0 msec (0 sec) Time taken for negative incremental diffs pass = 59 msec (0 sec) Time taken by PI to apply changes = 0 msec (0 sec) Time taken for Pass 1 = 380 msec (0 sec) Starting Pass 2 Time to read file system:running-config = 0 msec (0 sec) Number of lines read:55 Size of file :1054 Time taken for positive rollback pass = 0 msec (0 sec) Time taken for negative rollback pass = 0 msec (0 sec) Time taken for Pass 2 = 0 msec (0 sec) Total number of passes:1 Rollback Done |
Step 5 |
exit
Use this command to exit to user EXEC mode. For example: Example: Device# exit Device> |
Configuration Examples for Configuration Versioning
Example: Creating a Configuration Archive
The following example shows how to perform the initial configuration of the configuration archive. In this example, bootflash:myconfig is specified as the location and filename prefix for the files in the configuration archive and a value of 10 is set as the maximum number of archive files to be saved. Depending on your hardware platform, the name of your file system might be different than shown in the example.
configure terminal ! archive path bootflash:myconfig maximum 10 end
Additional References
Related Documents
Related Topic |
Document Title |
---|---|
Cisco IOS commands |
|
Information about managing configuration files |
“Managing Configuration Files” module in the Managing Configuration Files Configuration Guide |
Commands for managing configuration files |
Technical Assistance
Description |
Link |
---|---|
The Cisco Support and Documentation website provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password. |
Feature Information for Configuration Versioning
The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.Feature Name |
Releases |
Feature Information |
---|---|---|
Configuration Versioning |
12.2(25)S 12.2(33)SRA 12.3(7)T Cisco IOS XE Release 2.1 |
The Configuration Versioning feature allows you to maintain and manage backup copies of the Cisco running configuration on or off the device. The Configuration Replace feature uses the Configuration Versioning feature to provide a rollback to a saved copy of the running configuration. The following commands were introduced or modified: archive config, debug archive versioning, log config, maximum, path (archive configuration), show archive, time-period, write-memory. |