Professional Documents
Culture Documents
Worldwide [change]
Log In
Ac c ount
Register
My Cisco
Search
Support
How to Buy
Partners
Table Of Contents
Configuration Replace and Configuration Rollback Contents Prerequisites for Configuration Replace and Configuration Rollback Restrictions for Configuration Replace and Configuration Rollback Information About Configuration Replace and Configuration Rollback Configuration Archive Configuration Replace Configuration Rollback Benefits of Configuration Replace and Configuration Rollback How to Use Configuration Replace and Configuration Rollback Configuring the Configuration Archive Performing a Configuration Replace or Configuration Rollback Operation Monitoring and Troubleshooting the Configuration Replace and Configuration RollbackRollback Feature Configuration Examples for Configuration Replace and Configuration Rollback Configuring the Configuration Archive: Example Replacing the Current Running Configuration w ith a Saved Cisco IOS Configuration File: Example Reverting to the Startup Configuration File: Example Performing a Configuration Replace Operation w ith the configure confirm Command: Example Performing a Configuration Rollback Operation: Example Additional References Related Documents Standards MIBs RFCs Technical Assistance Command Reference archive config configure confirm configure replace debug archive config timestamp debug archive versioning maximum path (archive configuration) show archive show configuration lock time-period Feature Information for Configuration Replace and Configuration Rollback
Downloads
Configuration Replace and Configuration Rollback
pdfcrowd.com
If you have provided a suggestion, please enter your full name and e-mail address. This information is optional and allows us to contact you if necessary. Name: E-mail: Submit
Last Updated: Decem ber 4, 2006; Last Modifed: August 2007 The Configuration Replace and Configuration Rollback feature provides the capability to replace the current running configuration w ith any saved Cisco IOS configuration file. This functionality can be used to revert to a previous configuration state, effectively rolling back any configuration changes that w ere made since that configuration file w as saved. Finding Feature Inform ation in This Module Your Cisco IOS softw are release may not support all of the features documented in this module. To reach links to specific feature documentation in this module and to see a list of the releases in w hich each feature is supported, use the "Feature Information for Configuration Replace and Configuration Rollback" section. Finding Support Inform ation for Platform s and Cisco IOS Softw are Im ages Use Cisco Feature Navigator to find information about platform support and softw are image support. Cisco Feature Navigator enables you to determine w hich Cisco IOS and Catalyst OS softw are images support a specific softw are release, feature set, or platform. To access Cisco Feature Navigator, go to http://w w w .cisco.com/go/cfn. An account on Cisco.com is not required.
Contents
Prerequisites for Configuration Replace and Configuration Rollback Restrictions for Configuration Replace and Configuration Rollback Information About Configuration Replace and Configuration Rollback How to Use Configuration Replace and Configuration Rollback Configuration Examples for Configuration Replace and Configuration Rollback Additional References Command Reference Feature Information for Configuration Replace and Configuration Rollback
These indentation rules describe how Cisco IOS softw are creates configuration files for such Cisco IOS commands as show runningconfig or copy running-config destination-url. Any configuration file generated on a Cisco IOS device complies w ith these rules. Free memory larger than the combined size of the tw o configuration files (the current running configuration and the saved replacement configuration) is required.
pdfcrowd.com
Configuration Archive
The Cisco IOS configuration archive is intended to provide a mechanism to store, organize, and manage an archive of Cisco IOS configuration files to enhance the configuration rollback capability provided by the configure replace command. Before this feature w as 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. How ever, this method lacked any automated file management. On the other hand, the Configuration Replace and Configuration Rollback feature provides the capability to automatically save copies of the running configuration to the Cisco IOS configuration archive. These archived files serve as checkpoint configuration references and can be used by the configure replace command to revert to previous configuration states. The archive config command allow s you to save Cisco IOS configurations in the configuration archive using a standard location and filename prefix that is automatically appended w ith an incremental version number (and optional timestamp) as each consecutive file is saved. This functionality provides a means for consistent identification of saved Cisco IOS 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 w hen the next, most recent file is saved. The show archive command displays information for all configuration files saved in the Cisco IOS configuration archive. The Cisco IOS configuration archive, in w hich the configuration files are stored and available for use w ith the configure replace command, can be located on the follow ing file systems: If your platform has disk0disk0:, disk1:, ftp:, pram:, rcp:, slavedisk0:, slavedisk1:, or tftp: If your platform does not have disk0ftp:, http:, pram:, rcp:, or tftp:
Configuration Replace
The configure replace command provides the capability to replace the current running configuration w ith any saved Cisco IOS configuration file. This functionality can be used to revert to a previous configuration state, effectively rolling back any configuration changes that w ere made since the previous configuration state w as saved. When using the configure replace command, you must specify a saved Cisco IOS configuration as the replacement configuration file for the current running configuration. The replacement file must be a complete configuration generated by a Cisco IOS device (for example, a configuration generated by the copy running-config destination-url command), or, if generated externally, the replacement file must comply w ith the format of files generated by Cisco IOS devices. When the configure replace command is entered, the current running configuration is compared w ith the specified replacement configuration and a set of diffs is generated. The algorithm used to compare the tw o files is the same as that employed by the show archive config differences command. The resulting diffs are then applied by the Cisco IOS parser to achieve the replacement configuration state. Only the diffs are applied, avoiding potential service disruption from reapplying configuration commands that already exist in the current running configuration. This algorithm effectively handles configuration changes to order-dependent commands (such as access lists) through a multiple pass process. Under normal circumstances, no more than three passes are needed to complete a configuration replace operation, and a limit of five passes is performed to preclude any looping behavior. The Cisco IOS copy source-url running-config command is often used to copy a stored Cisco IOS configuration file to the running configuration. When using the copy source-url running-config command as an alternative to the configure replace target-url command, the follow ing major differences should be noted: The copy source-url running-config command is a merge operation and preserves all the commands from both the source file and the current running configuration. This command does not remove commands from the current running configuration that are not present in the source file. In contrast, the configure replace target-url command removes commands from the current running configuration that are not present in the replacement file and adds commands to the current running configuration that need to be added. The copy source-url running-config command applies every command in the source file, w hether or not the command is already present
pdfcrowd.com
in the current running configuration. This algorithm is inefficient and, in some cases, can result in service outages. In contrast, the configure replace target-url command only applies the commands that need to be appliedno existing commands in the current running configuration are reapplied. A partial configuration file may be used as the source file for the copy source-url running-config command, w hereas a complete Cisco IOS configuration file must be used as the replacement file for the configure replace target-url command.
Note In Cisco IOS Release 12.2(25)S and 12.3(14)T, a locking feature for the configuration replace operation w as introduced. When the configure replace command is used, the running configuration file is locked by default for the duration of the configuration replace operation. This locking mechanism prevents other users from changing the running configuration w hile the replacement operation is taking place, w hich might otherw ise cause the replacement operation to terminate unsuccessfully. You can disable the locking of the running configuration by using the nolock keyw ord w hen issuing the configure replace command. The running configuration lock is automatically cleared at the end of the configuration replace operation. You can display any locks that may be currently applied to the running configuration using the show configuration lock command.
Configuration Rollback
The concept of rollback comes from the transactional processing model common to database operations. In a database transaction, you might make a set of changes to a given database table. You then must choose w hether to commit the changes (apply the changes permanently) or to roll back the changes (discard the changes and revert to the previous state of the table). In this context, rollback means that a journal file containing a log of the changes is discarded, and no changes are applied. The result of the rollback operation is to revert to the previous state, before any changes w ere applied. The configure replace command allow s you to revert to a previous configuration state, effectively rolling back changes that w ere made since the previous configuration state w as saved. Instead of basing the rollback operation on a specific set of changes that w ere applied, the Cisco IOS configuration rollback capability uses the concept of reverting to a specific configuration state based on a saved Cisco IOS configuration file. This concept is similar to the database idea of saving a checkpoint (a saved version of the database) to preserve a specific state. If the configuration rollback capability is desired, you must save the Cisco IOS running configuration before making any configuration changes. Then, after entering configuration changes, you can use that saved configuration file to roll back the changes (using the configure replace target-url command). Furthermore, since you can specify any saved Cisco IOS configuration file as the replacement configuration, you are not limited to a fixed number of rollbacks, as is the case in some rollback models based on a journal file.
pdfcrowd.com
the Cisco IOS configuration archive and the archive config command is optional but offers significant benefit for configuration rollback scenarios. Before using the archive config command, the configuration archive must be configured. Perform this task to configure the characteristics of the configuration archive. SUMMARY STEPS 1. 2. 3. 4. 5. 6. 7. enable configure term inal archive path url m axim um number tim e-period minutes end
DETAILED STEPS
Command or Action
Step 1
enable Example: Router> enable
Purpose
Enables privileged EXEC mode. Enter your passw ord if prompted.
Step 2
Step 3
Step 4
Specifies the location and filename prefix for the files in the Cisco IOS configuration archive. The url argument is a URL (accessible by the Cisco IOS file system) used for saving archive files of the running configuration file in the Cisco IOS configuration archive. You can set up an archive on any file system that your platform supports (see the "Configuration Archive" section).
Step 5
(Optional) Sets the maximum number of archive files of the running configuration to be saved in the Cisco IOS configuration archive. The number argument is the maximum number of archive files of the running configuration to be saved in the Cisco IOS configuration archive. Valid values are from 1 to 14. The default is 10.
Note Before using this command, you must configure the path command to specify the location and filename prefix for the files in the Cisco IOS configuration archive.
Step 6
time-period
pdfcrowd.com
Step 6
time-period minutes
(Optional) Sets the time increment for automatically saving an archive file of the current running configuration in the Cisco IOS configuration archive. The minutes argument specifies how often, in minutes, to automatically save an archive file of the current running configuration in the Cisco IOS configuration archive.
Note Before using this command, you must configure the path command to specify the location and filename prefix for the files in the Cisco IOS configuration archive. Step 7
end Example: Router(configarchive)# end
DETAILED STEPS
Command or Action
Step 1 Configure the Cisco IOS configuration archive.
enable Example: Router> enable
Purpose
See the "Configuring the Configuration Archive" section.
Step 2
Step 3
archive config
Example: Router# archive Note The path command must be configured before using this config command.
(Optional) Saves the current running configuration file to the configuration archive.
Step 4
configure
pdfcrowd.com
Step 4
Step 5
Step 6
Step 7
configure Replaces the current running configuration file w ith a saved Cisco IOS replace target- configuration file. url [list] The target-url argument is a URL (accessible by the Cisco IOS file [force] [time system) of the saved Cisco IOS configuration file that is to replace seconds] [nolock] the current running configuration, such as the configuration file Example: Router# configure replace disk0:myconfig1 list time 30
created in Step 3 using the archive config command. The list keyw ord displays a list of the command lines applied by the Cisco IOS softw are parser during each pass of the configuration replace operation. The total number of passes performed is also displayed. The force keyw ord replaces the current running configuration file w ith the specified saved Cisco IOS configuration file w ithout prompting you for confirmation. The tim e seconds keyw ord and argument specify the time (in seconds) w ithin w hich you must enter the configure confirm command to confirm replacement of the current running configuration file. If the configure confirm command is not entered w ithin the specified time limit, the configuration replace operation is automatically reversed (in other w ords, the current running configuration file is restored to the configuration state that existed prior to entering the configure replace command). The nolock keyw ord disables the locking of the running configuration file that prevents other users from changing the running configuration during a configuration replace operation.
Step 8
(Optional) Confirms replacement of the current running configuration file w ith a saved Cisco IOS configuration file. Note Use this command only if the tim e seconds keyw ord and argument of the configure replace command are specified.
Step 9
Monitoring and Troubleshooting the Configuration Replace and Configuration RollbackRollback Feature Are you a developer? Try out the HTML to PDF API
pdfcrowd.com
Perform this task to monitor and troubleshoot the Configuration Replace and Configuration Rollback feature. SUMMARY STEPS 1. 1. 2. 3. 4. enable show archive debug archive versioning debug archive config tim estam p exit
DETAILED STEPS Step 1 enable Use this command to enable privileged EXEC mode. Enter your passw ord if prompted. For example: Router> enable Router#
Step 2 show archive Use this command to display information about the files saved in the Cisco IOS configuration archive. For example: Router# show archive
There are currently 1 archive configurations saved. The next archive file will be named disk0:myconfig-2 Archive # 0 1 2 3 4 5 6 7 8 9 10 11 12 disk0:myconfig-1 <- Most Recent Name
pdfcrowd.com
13 14
The follow ing 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. Router# show archive
There are currently 3 archive configurations saved. The next archive file will be named disk0:myconfig-8 Archive # 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 :Deleted :Deleted :Deleted :Deleted disk0:myconfig-5 disk0:myconfig-6 disk0:myconfig-7 <- Most Recent Name
Step 3 debug archive versioning Use this command to enable debugging of the Cisco IOS configuration archive activities to help monitor and troubleshoot configuration replace and rollback. For example: Router# debug archive versioning
pdfcrowd.com
Jan
Step 4 debug archive config tim estam p 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: Router# debug archive config timestamp Router# configure replace disk0: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)
pdfcrowd.com
Step 5 exit Use this command to exit to user EXEC mode. For example: Router# exit Router>
Replacing the Current Running Configuration with a Saved Cisco IOS Configuration File: Example
The follow ing example show s how to replace the current running configuration w ith a saved Cisco IOS configuration file named disk0:myconfig. The configure replace command interactively prompts you to confirm the operation. Router# configure replace disk0:myconfig
This will apply all necessary additions and deletions to replace the current running configuration with the contents of the specified configuration file, which is assumed to be a complete configuration, not a partial configuration. Enter Y if you are sure you want to proceed. ? [no]: Y
pdfcrowd.com
In the follow ing example, the list keyw ord is specified in order to display the command lines that w ere applied during the configuration replace operation: Router# configure replace disk0:myconfig list
This will apply all necessary additions and deletions to replace the current running configuration with the contents of the specified configuration file, which is assumed to be a complete configuration, not a partial configuration. Enter Y if you are sure you want to proceed. ? [no]: Y
!Pass 1
Performing a Configuration Replace Operation with the configure confirm Command: Example
The follow ing example show s the use of the configure replace command w ith the tim e seconds keyw ord and argument. You must enter the configure confirm command w ithin the specified time limit to confirm replacement of the current running configuration file. If the configure confirm command is not entered w ithin the specified time limit, the configuration replace operation is automatically reversed (in other w ords, the current running configuration file is restored back to the configuration state that existed prior to entering the configure replace command). Router# configure replace nvram:startup-config time 120
pdfcrowd.com
to replace the current running configuration with the contents of the specified configuration file, which is assumed to be a complete configuration, not a partial configuration. Enter Y if you are sure you want to proceed. ? [no]: Y
Note Before using the archive config command, you must configure the path command to specify the location and filename prefix for the files in the Cisco IOS configuration archive. You first save the current running configuration in the configuration archive as follow s: archive config
You then enter configuration changes as show n in the follow ing example: configure terminal ! user netops2 password rain user netops3 password snow exit
After having made changes to the running configuration file, assume you now w ant to roll back these changes and revert to the configuration that existed before the changes w ere made. The show archive command is used to verify the version of the configuration to be used as a replacement file. The configure replace command is then used to revert to the replacement configuration file as show n in the follow ing example:
pdfcrowd.com
The next archive file will be named disk0:myconfig-2 Archive # 0 1 2 3 4 5 6 7 8 9 10 disk0:myconfig-1 <- Most Recent Name
Additional References
The follow ing sections provide references related to the Configuration Replace and Configuration Rollback feature.
Document Title
Exclusive Configuration Change Access and Access Session Locking, Release 12.4(11)T feature module Cisco IOS Configuration Fundamentals Command Reference, Release 12.4T "Managing Configuration Files" chapter in the Cisco IOS Configuration Fundamentals Configuration Guide, Release 12.4T Contextual Configuration Diff Utility, Cisco IOS Release 12.3(4)T feature module
pdfcrowd.com
No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature.
No new or modified MIBs are supported by this To locate and dow nload MIBs for selected platforms, feature, and support for existing MIBs has not been Cisco IOS releases, and feature sets, use Cisco MIB modified by this feature. Locator found at the follow ing URL: http://w w w .cisco.com/go/mibs
RFCs RFCs
No new or modified RFCs are supported by this feature, and support for existing RFCs has not been modified by this feature.
Title
Link
http://w w w .cisco.com/techsupport
Command Reference
This section documents new and modified commands only. archive config configure confirm configure replace debug archive config tim estam p debug archive versioning m axim um path (archive configuration) show archive show configuration lock tim e-period
archive config
pdfcrowd.com
To save a copy of the current running configuration to the Cisco IOS configuration archive, use the archive config command in privileged EXEC mode. archive config Syntax Description This command has no arguments or keyw ords. Com m and Modes Privileged EXEC Com m and History
Release
12.3(7)T 12.2(25)S 12.2(27)SBC 12.2(33)SRA 12.2(31)SB2
Modification
This command w as introduced. This command w as integrated into Cisco IOS Release 12.2(25)S. This command w as integrated into Cisco IOS Release 12.2(27)SBC. This command w as integrated into Cisco IOS Release 12.2(33)SRA. This command w as implemented on the Cisco 10000 series.
Usage Guidelines
Note Before using this command, you must configure the path command in order to specify the location and filename prefix for the files in the Cisco IOS configuration archive. The Cisco IOS configuration archive is intended to provide a mechanism to store, organize, and manage an archive of Cisco IOS configuration files to enhance the configuration rollback capability provided by the configure replace command. Before this feature w as introduced, you could save copies of the running configuration using the copy running-config destination-url command, storing the target file either locally or remotely. How ever, this method lacked any automated file management. On the other hand, the Configuration Replace and Configuration Rollback feature provides the capability to automatically save copies of the running configuration to the Cisco IOS configuration archive. These archived files serve as checkpoint configuration references and can be used by the configure replace command to revert to previous configuration states. The archive config command allow s you to save Cisco IOS configurations in the configuration archive using a standard location and filename prefix that is automatically appended w ith an incremental version number (and optional time stamp) as each consecutive file is saved. This functionality provides a means for consistent identification of saved Cisco IOS configuration files. You can specify how many versions of the running configuration are kept in the archive. After the maximum number of files has been saved in the archive, the oldest file is automatically deleted w hen the next, most recent file is saved. The show archive command displays information for all configuration files saved in the Cisco IOS configuration archive. Exam ples The follow ing example show s how to save the current running configuration to the Cisco IOS configuration archive using the archive config command. Before using the archive config command, you must configure the path command to specify the location and filename prefix for the files in the Cisco IOS configuration archive. In this example, the location and filename prefix are specified as disk0:myconfig as follow s: configure terminal ! archive
pdfcrowd.com
You then save the current running configuration in the configuration archive, as follow s: archive config
The show archive command displays information on the files saved in the configuration archive as show n in the follow ing sample output: Router# show archive
There are currently 1 archive configurations saved. The next archive file will be named disk0:myconfig-2 Archive # 0 1 2 3 4 5 6 7 8 9 10 Related Com m ands disk0:myconfig-1 <- Most Recent Name
Command
archive configure confirm configure replace m axim um
Description
Enters archive configuration mode. Confirms replacement of the current running configuration w ith a saved Cisco IOS configuration file. Replaces the current running configuration w ith a saved Cisco IOS configuration file.
Sets the maximum number of archive files of the running configuration to be saved in the Cisco IOS configuration archive. Specifies the location and filename prefix for the files in the Cisco IOS configuration archive.
path
pdfcrowd.com
Displays information about the files saved in the Cisco IOS configuration archive.
Sets the time increment for automatically saving an archive file of the current running configuration in the Cisco IOS configuration archive.
configure confirm
To confirm replacement of the current running configuration w ith a saved Cisco IOS configuration file, use the configure confirm command in privileged EXEC mode. configure confirm Syntax Description This command has no arguments or keyw ords. Com m and Modes Privileged EXEC Com m and History
Release
12.3(7)T 12.2(25)S 12.2(27)SBC 12.2(33)SRA 12.2(31)SB2
Modification
This command w as introduced. This command w as integrated into Cisco IOS Release 12.2(25)S. This command w as integrated into Cisco IOS Release 12.2(27)SBC. This command w as integrated into Cisco IOS Release 12.2(33)SRA. This command w as implemented on the Cisco 10000 series.
Usage Guidelines The configure confirm command is used only if the tim e seconds keyw ord and argument of the configure replace command are specified. If the configure confirm command is not entered w ithin the specified time limit, the configuration replace operation is automatically reversed (in other w ords, the current running configuration file is restored to the configuration state that existed prior to entering the configure replace command). Exam ples The follow ing example show s the use of the configure replace command w ith the tim e seconds keyw ord and argument. You must enter the configure confirm command w ithin the specified time limit to confirm replacement of the current running configuration file: Router# configure replace nvram:startup-config time 120
This will apply all necessary additions and deletions to replace the current running configuration with the contents of the specified configuration file, which is assumed to be a complete configuration, not a partial
pdfcrowd.com
Command
archive config configure replace m axim um
Description
Saves a copy of the current running configuration to the Cisco IOS configuration archive.
Replaces the current running configuration w ith a saved Cisco IOS configuration file.
Sets the maximum number of archive files of the running configuration to be saved in the Cisco IOS configuration archive. Specifies the location and filename prefix for the files in the Cisco IOS configuration archive. Displays information about the files saved in the Cisco IOS configuration archive.
tim e-period Sets the time increment for automatically saving an archive file of the current running configuration in the Cisco IOS configuration archive.
configure replace
To replace the current running configuration w ith a saved Cisco IOS configuration file, use the configure replace command in privileged EXEC mode. configure replace target-url [list] [force] [tim e seconds] [nolock] Syntax Description
targeturl list
URL (accessible by the Cisco IOS file system) of the saved Cisco IOS configuration file that is to replace the current running configuration. (Optional) Displays a list of the command lines applied by the Cisco IOS softw are parser during each pass of the configuration replace operation. The total number of passes performed is also displayed. (Optional) Replaces the current running configuration file w ith the specified saved Cisco IOS configuration file w ithout prompting you for confirmation.
force
tim e (Optional) Time (in seconds) w ithin w hich you must enter the configure confirm command to seconds confirm replacement of the current running configuration file. If the configure confirm command is not entered w ithin the specified time limit, the configuration replace operation is automatically reversed (in other w ords, the current running configuration file is restored to the configuration state that existed
pdfcrowd.com
prior to entering the configure replace command). nolock (Optional) Disables the locking of the running configuration file that prevents other users from changing the running configuration during a configuration replace operation.
Release
12.3(7)T 12.2(25)S 12.2(27)SBC 12.2(33)SRA 12.2(31)SB
Modification
This command w as introduced. The nolock keyw ord w as added. This command w as integrated into Cisco IOS Release 12.2(27)SBC. This command w as integrated into Cisco IOS Release 12.2(33)SRA. This command w as implemented on the Cisco 10000 series.
Usage Guidelines When configuring more than one keyw ord option, use the follow ing rules: The list keyw ord must be entered before the force and tim e keyw ords. The force keyw ord must be entered before the tim e keyw ord.
If the current running configuration is replaced w ith a saved Cisco IOS configuration file that contains commands unaccepted by the Cisco IOS softw are parser, an error message is displayed listing the commands that w ere unaccepted. The total number of passes performed in the configuration replace operation is also displayed.
Note In Cisco IOS Release 12.2(25)S, a locking feature for the configuration replace operation w as introduced. When the configure replace command is enabled, the Cisco IOS running configuration file is locked by default for the duration of the configuration replace operation. This locking mechanism prevents other users from changing the running configuration w hile the replace operation is taking place, w hich might otherw ise cause the replace operation to terminate unsuccessfully. You can disable the locking of the running configuration using the configure replace nolock command. The running configuration lock is automatically cleared at the end of the configuration replace operation. It is not expected that you should need to clear the lock manually during the replace operation, but as a protection against any unforeseen circumstances, you can manually clear the lock using the clear configuration lock command. You can also display any locks that may be currently applied to the running configuration using the show configuration lock command. Exam ples This section contains the follow ing examples: Replacing the Current Running Configuration w ith a Saved Cisco IOS Configuration File Reverting to the Startup Configuration File Performing a Configuration Replace Operation w ith the configure confirm Command Performing a Configuration Rollback Operation
pdfcrowd.com
Replacing the Current Running Configuration w ith a Saved Cisco IOS Configuration File The follow ing example show s how to replace the current running configuration w ith a saved Cisco IOS configuration file named disk0:myconfig. Note that the configure replace command interactively prompts you to confirm the operation. Router# configure replace disk0:myconfig
This will apply all necessary additions and deletions to replace the current running configuration with the contents of the specified configuration file, which is assumed to be a complete configuration, not a partial configuration. Enter Y if you are sure you want to proceed. ? [no]: Y
In the follow ing example, the list keyw ord is specified to display the command lines that w ere applied during the configuration replace operation: Router# configure replace disk0:myconfig list
This will apply all necessary additions and deletions to replace the current running configuration with the contents of the specified configuration file, which is assumed to be a complete configuration, not a partial configuration. Enter Y if you are sure you want to proceed. ? [no]: Y
!Pass 1
pdfcrowd.com
Reverting to the Startup Configuration File The follow ing example show s how to revert to the Cisco IOS startup configuration file. This example also show s the use of the optional force keyw ord to override the interactive user prompt. Router# configure replace nvram:startup-config force
Total number of passes: 1 Rollback Done Perform ing a Configuration Replace Operation w ith the configure confirm Com m and The follow ing example show s the use of the configure replace command w ith the tim e seconds keyw ord and argument. You must enter the configure confirm command w ithin the specified time limit to confirm replacement of the current running configuration file. If the configure confirm command is not entered w ithin the specified time limit, the configuration replace operation is automatically reversed (in other w ords, the current running configuration file is restored to the configuration state that existed prior to entering the configure replace command). Router# configure replace nvram:startup-config time 120
This will apply all necessary additions and deletions to replace the current running configuration with the contents of the specified configuration file, which is assumed to be a complete configuration, not a partial configuration. Enter Y if you are sure you want to proceed. ? [no]: Y
Router# configure confirm Perform ing a Configuration Rollback Operation The follow ing example show s how to make changes to the current running configuration and then roll back the changes. As part of the configuration rollback operation, you must save the current running configuration before making changes to the file. In this example, the archive config command is used to save the current running configuration. Note that the generated output of the configure replace command indicates that only one pass w as performed to complete the rollback operation.
Note The path command must be configured before using the archive config command. You first save the current running configuration in the configuration archive as follow s: Router# archive config
You then enter configuration changes as show n in the follow ing example: Router# configure terminal
pdfcrowd.com
Router(config)# user netops2 password rain Router(config)# user netops3 password snow Router(config)# exit
After making changes to the running configuration file, you might w ant to roll back these changes and revert to the configuration that existed before the changes w ere made. The show archive command is used to verify the version of the configuration to be used as a target file. The configure replace command is then used to revert to the target configuration file as show n in the follow ing example:
There are currently 1 archive configurations saved. The next archive file will be named disk0:myconfig-2 Archive # 0 1 2 3 4 5 6 7 8 9 10 disk0:myconfig-1 <- Most Recent Name
Command
archive config
Description
Saves a copy of the current running configuration to the Cisco IOS configuration archive.
pdfcrowd.com
Confirms replacement of the current running configuration w ith a saved Cisco IOS configuration file. Sets the maximum number of archive files of the running configuration to be saved in the Cisco IOS configuration archive. Specifies the location and filename prefix for the files in the Cisco IOS configuration archive. Displays information about the files saved in the Cisco IOS configuration archive.
Sets the time increment for automatically saving an archive file of the current running configuration in the Cisco IOS configuration archive.
Release
12.3(7)T 12.2(25)S 12.2(27)SBC 12.2(33)SRA 12.2(31)SB2
Modification
This command w as introduced. This command w as integrated into Cisco IOS Release 12.2(25)S. This command w as integrated into Cisco IOS Release 12.2(27)SBC. This command w as integrated into Cisco IOS Release 12.2(33)SRA. This command w as implemented on the Cisco 10000 series.
Exam ples The follow ing is sample output from the debug archive config tim estam p command: Router# debug archive config timestamp Router# configure replace disk0:myconfig force
pdfcrowd.com
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)
Command
debug archive versioning
Description
Enables debugging of the Cisco IOS configuration archive activities.
pdfcrowd.com
Release
12.3(7)T 12.2(25)S 12.2(27)SBC 12.2(33)SRA 12.2(31)SB2
Modification
This command w as introduced. This command w as integrated into Cisco IOS Release 12.2(25)S. This command w as integrated into Cisco IOS Release 12.2(27)SBC. This command w as integrated into Cisco IOS Release 12.2(33)SRA. This command w as implemented on the Cisco 10000 series.
Exam ples The follow ing is sample output from the debug archive versioning command: Router# debug archive versioning
Command
debug archive config tim estam p
Description
Enables debugging of the processing time for each integral step of a configuration replace operation and the size of the configuration files being handled.
maximum
To set the maximum number of archive files of the running configuration to be saved in the Cisco IOS configuration archive, use the m axim um command in archive configuration mode. To reset this command to its default, use the no form of this command. m axim um number no m axim um number Syntax Description
number Maximum number of archive files of the running configuration to be saved in the Cisco IOS configuration archive. You can archive from 1 to 14 configuration files. The default is 10.
pdfcrowd.com
Com m and Default By default, a maximum of 10 archive files of the running configuration are saved in the Cisco IOS configuration archive. Com m and Modes Archive configuration Com m and History
Release
12.3(7)T 12.2(25)S 12.2(27)SBC 12.2(33)SRA 12.2(31)SB2
Modification
This command w as introduced. This command w as integrated into Cisco IOS Release 12.2(25)S. This command w as integrated into Cisco IOS Release 12.2(27)SBC. This command w as integrated into Cisco IOS Release 12.2(33)SRA. This command w as implemented on the Cisco 10000 series.
Usage Guidelines
Note Before using this command, you must configure the path command to specify the location and filename prefix for the files in the Cisco IOS configuration archive. After the maximum number of files are saved in the Cisco IOS configuration archive, the oldest file is automatically deleted w hen the next, most recent file is saved.
Note This command should only be used w hen a local w ritable file system is specified in the url argument of the path command. Netw ork file systems may not support deletion of previously saved files. Exam ples In the follow ing example, a value of 5 is set as the maximum number of archive files of the running configuration to be saved in the Cisco IOS configuration archive: configure terminal ! archive path disk0:myconfig maximum 5 end Related Com m ands
Command
archive config
Description
Saves a copy of the current running configuration to the Cisco IOS configuration archive.
pdfcrowd.com
Confirms replacement of the current running configuration w ith a saved Cisco IOS configuration file. Replaces the current running configuration w ith a saved Cisco IOS configuration file.
Specifies the location and filename prefix for the files in the Cisco IOS configuration archive. Displays information about the files saved in the Cisco IOS configuration archive.
Sets the time increment for automatically saving an archive file of the current running configuration in the Cisco IOS configuration archive.
url URL (accessible by the Cisco IOS file system) used for saving archive files of the running configuration file in the Cisco IOS configuration archive.
Com m and Default If this command is not configured, no location or filename prefix is specified for files in the Cisco IOS configuration archive. Com m and Modes Archive configuration Com m and History
Release
12.3(7)T 12.2(25)S 12.2(27)SBC 12.2(33)SRA 12.2(31)SB2
Modification
This command w as introduced. This command w as integrated into Cisco IOS Release 12.2(25)S. This command w as integrated into Cisco IOS Release 12.2(27)SBC. This command w as integrated into Cisco IOS Release 12.2(33)SRA. This command w as implemented on the Cisco 10000 series.
Usage Guidelines When this command is entered, an archive file of the running configuration is saved w hen the archive config, w rite-m em ory, or copy
pdfcrowd.com
running-config startup-config command is entered. URLs are commonly used to specify files or location on the World Wide Web. On Cisco routers, URLs can be used to specify the location of a file or directory on a router or a remote file server. The path command uses a URL to specify the location and filename prefix for the Cisco IOS configuration archive. The locations or file systems that you can specify in the url argument are as follow s: If your platform has disk0disk0:, disk1:, ftp:, pram:, rcp:, slavedisk0:, slavedisk1:, or tftp: If your platform does not have disk0ftp:, http:, pram:, rcp:, or tftp:
The colon is required in the location format. The filename of the first archive file is the filename specified in the url argument follow ed by -1. The filename of the second archive file is the filename specified in the url argument follow ed by -2 and so on. Because some file systems are incapable of storing the date and time that a file w as w ritten, the filename of the archive file can contain the date, time, and router hostname. To include the router hostname in the archive file filename, enter the characters $h (for example, disk0:$h). To include the date and time in the archive file filename, enter the characters $t. When a configuration archive operation is attempted on a local file system, the file system is tested to determine if it is w ritable and if it has sufficient space to save an archive file. If the file system is read-only or if there is not enough space to save an archive file, an error message is displayed. If you specify the tftp: file server as the location w ith the path command, you need to create the configuration file on the TFTP file server and change the file's privileges before the archive config command w orks properly. Exam ples The follow ing example of the path command show s how to specify the hostname, date, and time as the filename prefix for w hich to save archive files of the running configuration. In this example, the tim e-period command is also configured to automatically save an archive file of the running configuration every 20 minutes. configure terminal ! archive path disk0:$h$t time-period 20 end
The follow ing is sample output from the show archive command illustrating the format of the resulting configuration archive filenames. Router# show archive
There are currently 3 archive configurations saved. The next archive file will be named routerJan-16-01:12:23.019-4 Archive # 0 1 2 3 4 disk0:routerJan-16-00:12:23.019-1 disk0:routerJan-16-00:32:23.019-2 disk0:routerJan-16-00:52:23.019-3 <- Most Recent Name
pdfcrowd.com
5 6 7 8 9 10 11 12 13 14 Cisco IOS Configuration Archive on the TFTP File Server The follow ing example show s how to use the path command to specify the TFTP file server, address 10.48.71.226, as the archive configuration location and router-cfg as the configuration filename. First you need to create the configuration file on the TFTP server and change the file's privileges, then you can save configuration file to the configuration archive. The follow ing example show s the commands to use to create the file and change the file's privileges on the TFTP server (UNIX commands): > touch router-cfg-1 > chmod 777 router-cfg-1
The follow ing example show how to create the configuration archive, save the running configuration to the archive, and display the files in the archive: configure terminal ! archive path tftp://10.48.71.226/router-cfg exit exit ! archive config
The next archive file will be named tftp://10.48.71.226/router-cfg-2 Archive # 0 1 tftp://10.48.71.226/router-cfg-1 <- Most Recent Name
pdfcrowd.com
2 3 4 5 6 7 8 9 10 11 12 13 14 Router#
The follow ing is sample output from the show archive command if you did not create the configuration file on the TFTP server before attempting to archive the current running configuration file: configure terminal ! archive path tftp://10.48.71.226/router-cfg exit exit
archive config
pdfcrowd.com
Command
archive archive config configure confirm configure replace m axim um
Description
Enters archive configuration mode. Saves a copy of the current running configuration to the Cisco IOS configuration archive.
Confirms replacement of the current running configuration w ith a saved Cisco IOS configuration file. Replaces the current running configuration w ith a saved Cisco IOS configuration file.
Sets the maximum number of archive files of the running configuration to be saved in the Cisco IOS configuration archive. Displays information about the files saved in the Cisco IOS configuration archive.
Sets the time increment for automatically saving an archive file of the current running configuration in the Cisco IOS configuration archive.
show archive
To display information about the files saved in the Cisco IOS configuration archive, use the show archive command in privileged EXEC mode. show archive Syntax Description This command has no arguments or keyw ords. Com m and Modes Privileged EXEC Com m and History
pdfcrowd.com
Release
12.3(7)T 12.2(25)S 12.2(27)SBC 12.2(33)SRA 12.2(31)SB2
Modification
This command w as introduced. This command w as integrated into Cisco IOS Release 12.2(25)S. This command w as integrated into Cisco IOS Release 12.2(27)SBC. This command w as integrated into Cisco IOS Release 12.2(33)SRA. This command w as implemented on the Cisco 10000 series.
Exam ples The follow ing is sample output from the show archive command: Router# show archive
There are currently 1 archive configurations saved. The next archive file will be named disk0:myconfig-2 Archive # 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 disk0:myconfig-1 <- Most Recent Name
The follow ing 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. Router# show archive
pdfcrowd.com
There are currently 3 archive configurations saved. The next archive file will be named disk0:myconfig-8 Archive # 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 :Deleted :Deleted :Deleted :Deleted disk0:myconfig-5 disk0:myconfig-6 disk0:myconfig-7 <- Most Recent Name
Table 1 describes the significant fields show n in the displays. Table 1 show archive Field Descriptions
Field
Description
Archive Indicates the number of the running configuration file saved to the Cisco IOS configuration archive. You # can set the maximum number of archive files of the running configuration to be saved in the configuration archive. The most recent archive file is the last one show n in the display. Name Indicates the name of the running configuration file saved to the Cisco IOS configuration archive.
Command
archive config configure confirm
Description
Saves a copy of the current running configuration to the Cisco IOS configuration archive.
Confirms replacement of the current running configuration w ith a saved Cisco IOS configuration file.
pdfcrowd.com
Replaces the current running configuration w ith a saved Cisco IOS configuration file.
Sets the maximum number of archive files of the running configuration to be saved in the Cisco IOS configuration archive. Specifies the location and filename prefix for the files in the Cisco IOS configuration archive. Sets the time increment for automatically saving an archive file of the current running configuration in the Cisco IOS configuration archive.
Release
12.2(25)S 12.3(14)T
Modification
This command w as introduced. This command w as integrated into Cisco IOS Release 12.3(14)T. The output of this command w as updated to display the configuration locking class.
The command output w as enhanced. This command w as integrated into Cisco IOS Release 12.2(27)SBC. This command w as integrated into Cisco IOS Release 12.2(33)SRA. This command w as implemented on the Cisco 10000 series.
Exam ples The follow ing is sample output from the show configuration lock command w hen the running configuration file is locked by another user. Cisco IOS Release 12.2(25)S, Release 12.2(27)SBC, Release 12.3(14)T, and Later Releases Router# configure terminal
pdfcrowd.com
auto manual
Enter configuration commands, one per line. End with CNTL/Z. Router(config)# Router(config)# show configuration lock Parser Configure Lock --------------------Owner PID : 3 User : unknown TTY : 0 Type : EXCLUSIVE State : LOCKED Class : EXPOSED Count : 1 Pending Requests : 0 User debug info : configure terminal Router(config)# Router(config)# end ! <------------ Releases the lock The follow ing is sample output from the show configuration lock command w hen the running configuration file is not locked by another user. Router# show configuration lock Parser Configure Lock --------------------Owner PID : -1
pdfcrowd.com
User : unknown TTY : -1 Type : NO LOCK State : FREE Class : unknown Count : 0 Pending Requests : 0 User debug info : Router# Cisco IOS Release 12.0(31)S, 12.2(33)SRA, and Later Releases Router# show configuration lock
Parser Configure Lock -----------------------------------------------------Owner PID User TTY Type State Class Count Pending Requests User debug info Session idle state No of exec cmds getting executed No of exec cmds blocked Config wait for show completion Remote ip address Lock active time (in Sec) Lock Expiration timer (in Sec) Router(config)# : 3 : unknown : 0 : EXCLUSIVE : LOCKED : EXPOSED : 1 : 0 : configure terminal : TRUE : 0 : 0 : FALSE : Unknown : 6 : 593
Table 2 describes the significant fields show n in the displays. Table 2 show configuration lock Field Descriptions
Field
Ow ner PID User
Description
Process identifier (PID) of the process that ow ns the lock. Ow ner's username.
pdfcrowd.com
Ow ner's username. Ow ner's terminal number. Lock type (EXCLUSIVE/COUNTER/NO LOCK). State of the lock (FREE/LOCKED). Classification of users of the lock (EXPOSED/ROLLBACK). Processes other than ROLLBACK belong to the EXPOSED class. In the case of a counter lock, total number of processes holding the lock. Total number of processes blocked by the lock.
Count Pending Requests User debug info Session idle state No of exec cmds getting executed
Indicates w hether the user in an access session locking session is idle. Displays TRUE or FALSE. Total number of EXEC commands (show and clear) being executed simultaneously from different sessions.
No of exec Total number of EXEC commands (show and clear) w aiting for the configuration command cmds blocked (running from the access session locking session) to complete its execution. Config w ait for show completion Remote ip address Lock active time (in Sec) Lock Expiration timer (in Sec) Indicates w hether a configuration command executed in an access session locking session is w aiting for the completion of the show command being executed simultaneously from a different session. Displays TRUE or FALSE. IP address of the terminal from w hich the user telneted to the router.
The amount of time, in seconds, that expires before the lock is automatically released.
The follow ing example show s how to configure the configuration file for single user auto configuration mode (using the configuration m ode exclusive auto command). Use the configure term inal command to enter global configuration mode and lock the configuration mode exclusively. Once the Cisco IOS configuration mode is locked exclusively, you can verify the lock using the show configuration lock command. Router# Router# configure terminal Router(config)# configuration mode exclusive auto Router(config)# end
pdfcrowd.com
: : : : : : :
Command
configuration m ode exclusive configure replace
Description
Enables single-user (exclusive) access functionality for the Cisco IOS CLI.
Replaces the current running configuration w ith a saved Cisco IOS configuration file. Enables debugging of the Cisco IOS configuration lock.
time-period
To set the time increment for automatically saving an archive file of the current running configuration in the Cisco IOS configuration archive, use the tim e-period command in archive configuration mode. To disable this function, use the no form of this command. tim e-period minutes no tim e-period minutes Syntax Description
pdfcrowd.com
minutes Specifies how often, in minutes, to automatically save an archive file of the current running configuration in the Cisco IOS configuration archive.
Com m and Default By default, no time increment is set. Com m and Modes Archive configuration Com m and History
Release
12.3(7)T 12.2(25)S 12.2(27)SBC 12.2(33)SRA 12.2(31)SB2
Modification
This command w as introduced. This command w as integrated into Cisco IOS Release 12.2(25)S. This command w as integrated into Cisco IOS Release 12.2(27)SBC. This command w as integrated into Cisco IOS Release 12.2(33)SRA. This command w as implemented on the Cisco 10000 series.
Usage Guidelines
Note Before using this command, you must configure the path command to specify the location and filename prefix for the files in the Cisco IOS configuration archive. If this command is configured, an archive file of the current running configuration is automatically saved after the given time specified by the minutes argument. Archive files continue to be automatically saved at this given time increment until this function is disabled. Use the m axim um command to set the maximum number of archive files of the running configuration to be saved.
Note This command saves the current running configuration to the configuration archive w hether or not the running configuration has been modified since the last archive file w as saved. Exam ples In the follow ing example, a value of 20 minutes is set as the time increment for w hich to automatically save an archive file of the current running configuration in the Cisco IOS configuration archive: configure terminal ! archive path disk0:myconfig time-period 20 end
pdfcrowd.com
Command
archive config configure confirm configure replace m axim um
Description
Saves a copy of the current running configuration to the Cisco IOS configuration archive.
Confirms replacement of the current running configuration w ith a saved Cisco IOS configuration file. Replaces the current running configuration w ith a saved Cisco IOS configuration file.
Sets the maximum number of archive files of the running configuration to be saved in the Cisco IOS configuration archive. Specifies the location and filename prefix for the files in the Cisco IOS configuration archive.
path
show archive Displays information about the files saved in the Cisco IOS configuration archive.
Note Table 3 lists only the Cisco IOS softw are release that introduced support for a given feature in a given Cisco IOS softw are release. Unless noted otherw ise, subsequent releases of that Cisco IOS softw are release also support that feature. Table 3 Feature Inform ation for Configuration Replace and Configuration Rollback
Feature Name
Configuration Replace and Configuration Rollback (F4239)
Releases
12.3(7)T, 12.2(25)S, 12.3(14)T, 12.2(27)SBC, 12.2(31)SB2, 12.2(33)SRA, 12.2(33)SXH
Feature Information
The Configuration Replace and Configuration Rollback feature provides the capability to replace the current running configuration w ith any saved Cisco IOS configuration file. This functionality can be used to revert to a previous configuration state, effectively rolling back any configuration changes that w ere made since that configuration file w as saved. In 12.3(7)T, this feature w as introduced. In 12.2(25)S, support w as added for a Cisco IOS 12.2S release. A locking mechanism for configuration replace (the Exclusive Configuration Change Access feature) w as introduced. In 12.3(14)T, support for a locking mechanism for configuration replace (the Exclusive Configuration Change Access feature) w as added for a Cisco IOS 12.3T release. In 12.2(27)SBC, support w as added for a Cisco IOS 12.2SB release.
pdfcrowd.com
In 12.2(33)SRA, support w as added for a Cisco IOS 12.2SR release. In 12.2(31)SB2, this feature w as implemented on the Cisco 10000 series. In 12.2(33)SXH, the "Configuration Rollback" feature w as implemented in Release 12.2SX. The follow ing sections provide information about this feature: Configuration Archive Configuration Replace Configuration Rollback Benefits of Configuration Replace and Configuration Rollback Configuring the Configuration Archive Performing a Configuration Replace or Configuration Rollback Operation Monitoring and Troubleshooting the Configuration Replace and Configuration RollbackRollback Feature
The follow ing commands w ere modified by this feature: archive config, configure confirm , configure replace, debug archive config tim estam p, debug archive versioning, m axim um , path (archive configuration), show archive, show configuration lock, tim e-period. Configuration 12.3(7)T, Versioning 12.2(25)S, 12.2(33)SRA The Configuration Versioning feature allow s you to maintain and manage backup copies of the Cisco IOS 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 Exclusive Configuration Change Access feature (also called the "Configuration Lock" feature) allow s you to have exclusive change access to the Cisco IOS running configuration, preventing multiple users from making concurrent configuration changes. The follow ing command w as modified by this feature and applies to the Configuration Replace and Configuration Rollback feature: show configuration lock.
Any Internet Protocol (IP) addresses used in this document are not intended to be ac tual addresses. Any examples, c ommand display output, and figures included in the document are shown for illustrative purposes only. Any use of ac tual IP addresses in illustrative c ontent is unintentional and coincidental. 2004 - 2006 Cisco Systems, Inc. All rights reserved.
pdfcrowd.com
Information For
Small Business Service Provider Executives Home
Support
Dow nloads Documentation
About Cisco
Investor Relations Corporate Social Responsibility Environmental Sustainability Human Netw ork Career Opportunities
Communities
Developer Netw ork Learning Netw ork Support Community
Industries Contacts
Contact Cisco Find a Partner
Technology Trends
Cloud IPv6 Video Architecture Virtualization Experience Infrastructure
Offers
Special Offers Financing Options
Contacts | Feedback | Help | Site Map | Terms & Conditions | Privacy Statement | Cookie Policy | Trademarks
pdfcrowd.com