Table Of Contents
Configuration Logger Persistency
Prerequisites for Configuration Logger Persistency
Information About Configuration Logger Persistency
Use of Configuration Logger Persistency to Save Configuration Files
How to Configure the Configuration Logger Persistency Feature
Enabling the Configuration Logger Persistency Feature
Verifying and Troubleshooting the Configuration Logger Persistency Feature
Configuration Examples for the Configuration Logger Persistency Feature
Configuration Logger Persistency configuration on a Cisco 7200 series router: Example
archive log config persistent save
(config-archive-log-cfg) logging persistent
debug archive log config persistent
Feature Information for Configuration Logger Persistency
Configuration Logger Persistency
First Published: June 19, 2006Last Updated: August 6, 2007The Configuration Logger Persistency feature increases the operational robustness of Cisco IOS configuration and provisioning actions by implementing a "quick-save" functionality. When the Configuration Logger Persistency feature is configured, Cisco IOS software saves just the commands entered since the last startup-config file was generated, rather than saving the entire startup configuration.
Finding Feature Information in This Module
Your Cisco IOS software 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 which each feature is supported, use the "Feature Information for Configuration Logger Persistency" section.
Finding Support Information for Platforms and Cisco IOS and Catalyst OS Software Images
Use Cisco Feature Navigator to find information about platform support and Cisco IOS and Catalyst OS software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required.
Contents
•Prerequisites for Configuration Logger Persistency
•Information About Configuration Logger Persistency
•How to Configure the Configuration Logger Persistency Feature
•Configuration Examples for the Configuration Logger Persistency Feature
•Feature Information for Configuration Logger Persistency
Prerequisites for Configuration Logger Persistency
To enable the Configuration Logger Persistency feature, you must have disk0: configured and an external flash card inserted on the router.
To achieve optimum results from the Configuration Logger Persistency feature, you must have Cisco IOS Release 12.2(33)SRA, Release 12.4(11)T, or Release 12.2(33)SXH installed on your system.
Information About Configuration Logger Persistency
To understand and use the Configuration Logger Persistency feature, you should be familiar with the following concepts:
•Use of Configuration Logger Persistency to Save Configuration Files
Use of Configuration Logger Persistency to Save Configuration Files
Cisco IOS software uses the startup-config file to save router configuration commands across reloads. This single file contains all the commands that need to be applied when the router reboots. The startup-config file gets updated every time a write memory command or copy url startup-config command is entered. As the size of the running-config file grows, the time to save the startup-config file to the NVRAM file system increases as well. Startup-config files can be 1 MB and larger. For files of this size, making a single-line change to the startup-config file requires that the entire startup-config file is saved again even though most of the configuration has not changed.
The Configuration Logger Persistency feature implements a "quick-save" functionality. The aim is to provide a "configuration save" mechanism where the time to save changes from the startup-config file is proportional to the size of the incremental changes (with respect to the startup-config file) that need to be saved.
The Cisco IOS configuration logger logs all changes that are manually entered at the command-line prompt. This feature also notifies the registered clients when changes to the log occur. The contents of the configuration log are stored in the run-time memory—the contents of the log are not persisted after reboots.
The Configuration Logger Persistency feature provides a mechanism to persist the configuration commands entered by users across reloads. Only the commands entered at the command-line interface (CLI) (that is, the commands entered in configuration mode) are persisted across reload. This feature uses the Cisco IOS secure file system to persist the configuration commands that are generated.
Note The Cisco IOS configuration logger is different from the system message logging (syslog) facility. Syslog is a general logging facility for tracking system messages. The configuration logger tracks information about configuration commands entered at the CLI.
Persisted Commands
The persisted commands from the Cisco IOS configuration logger are used as an extension to the startup configuration. These saved commands provide a quick-save capability. Rather than saving the entire startup-config file, Cisco IOS software saves just the commands entered since the last startup-config file was generated.
Only the logged commands are persisted. The following additional data from the configuration logger are not persisted:
•User who logged the command
•IP address from which the user logged in
•Session and log indexes for the logged command
•Time when the command was entered
•Pre- and post-NVGEN output associated with the entered command
•Parser return code output for the entered command
The persisted commands' primary purpose is for use as a quick-save extension to the startup-config file. The additional information associated with a configuration command is not useful for quick-save purposes. If you need the additional information to be persisted across reboots (for auditing purposes), complete the following steps:
1. Enable configuration logger notification to syslog
2. Enable the syslog persistence feature
Alternatively, Cisco Networking Services, CiscoView, or other Network Management systems that manage Cisco IOS devices to keep track of configuration changes in an off-the-box storage solution can be used.
By default, upon reload, the persisted commands are appended to the startup-config file. These commands are applied only when you explicitly configure this behavior using a CLI configuration command.
How to Configure the Configuration Logger Persistency Feature
This section provides information about the following:
•Enabling the Configuration Logger Persistency Feature (required)
•Verifying and Troubleshooting the Configuration Logger Persistency Feature (optional)
Enabling the Configuration Logger Persistency Feature
The Configuration Logger Persistency feature implements a quick-save mechanism so that the time to save changes from the startup configuration is proportional to the size of the incremental changes (with respect to the startup configuration) that need to be saved. The persisted commands from the Cisco IOS configuration logger will be used as an extension to the startup configuration. The saved commands, which are used as an extension to the startup configuration, provide a quick-save ability. Rather than saving the entire startup-config file, Cisco IOS software saves just the commands entered since the last startup-config file was generated.
To enable the Configuration Logger Persistency feature, perform the following task.
SUMMARY STEPS
1. enable
2. configure terminal
3. archive
4. log config
5. logging persistent {auto | manual}
6. logging persistent reload
7. logging size entries
DETAILED STEPS
Verifying and Troubleshooting the Configuration Logger Persistency Feature
Three privileged EXEC commands can be used to verify, archive, and clear the contents of the configuration log. For troubleshooting purposes, the command in Step 4 turns on debugging.
SUMMARY STEPS
1. show archive log config persistent
2. clear archive log config persistent
3. archive log config persistent save
4. debug archive log config persistent
DETAILED STEPS
Step 1 show archive log config persistent
This command displays the persisted commands in the configuration log. The commands appear in a configlet format. The following is sample output from this command:
Router# show archive log config persistent!Configuration logger persistentarchivelog configlogging persistent autologging persistent reloadarchivelog configlogging size 10logging consoleinterface loop 101ip address 10.1.1.1 255.255.255.0ip address 10.2.2.2 255.255.255.0no shutdownStep 2 clear archive log config persistent
This command clears the configuration logging persistent database entries. Only the entries in the configuration logging database file are deleted. The file itself is not deleted because it will be used to log new entries. After this command is entered, a message is returned to indicate that the archive log is cleared:
Router# clear archive log config persistentPurged the config log persist database entries successfullyRouter#Step 3 archive log config persistent save
This command saves the configuration log to the Cisco IOS secure file system. For this command to work, the archive log config persistent save command must be configured.
Step 4 debug archive log config persistent
This command turns on the debugging function. A message is returned to indicate that debugging is turned on.
Router# debug archive log config persistentdebug archive log config persistent debugging is on
Configuration Examples for the Configuration Logger Persistency Feature
This section provides a sample configuration of the Configuration Logger Persistency feature on a Cisco 7200 series router. In this example, each configuration command is saved automatically to the Cisco IOS secure file system, configuration commands saved in the configuration logger database (since the last write memory command) are applied sequentially to the running-config file, and the maximum number of entries retained in the configuration log is set to 10:
•Configuration Logger Persistency configuration on a Cisco 7200 series router: Example
Configuration Logger Persistency configuration on a Cisco 7200 series router: Example
Router> enableRouter# configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)# archiveRouter(config-archive)# log configRouter(config-archive-log-config)# logging persistent autoconfiguration log persistency feature enabled. Building configuration... [OK]Router(config-archive-log-config)# logging persistent reloadRouter(config-archive-log-config)# logging size 10Router(config-archive-log-config)# archive log config persistent saveRouter(config-archive-log-config)# endRouter#Additional References
The following sections provide references related to the Configuration Logger Persistency feature.
Related Documents
Related Topic Document TitleComprehensive command-reference information
Cisco IOS Configuration Fundamentals Command Reference
Standards
MIBs
RFCs
Technical Assistance
Command Reference
This section documents only commands that are new or modified.
•archive log config persistent save
•(config-archive-log-cfg) logging persistent
•debug archive log config persistent
archive log config persistent save
To save the persisted commands in the configuration log to the Cisco IOS secure file system, use the archive log config persistent save command in virtually any configuration mode.
archive log config persistent save
Syntax Description
This command has no arguments or keywords.
Command Default
If this command is not entered, the persisted configuration commands in the archive log are not saved to the Cisco IOS secure file system.
Command Modes
Configuration change logger configuration mode in archive configuration mode is common for this command, but the command can be used in virtually any configuration mode.
Command History
Usage Guidelines
This command can be entered at any time, regardless of what mode the router is in. If the router is in the persistent periodic mode, the persistent timer is restarted.
Examples
The following example saves the persisted commands in the archive log to the Cisco IOS secure file system:
Router(config-archive-log-cfg)# archive log config persistent saveRelated Commands
clear archive log config
To purge the configuration logging database entries, use the clear archive log config command in privileged EXEC mode.
clear archive log config [force | persistent]
Syntax Description
force
(Optional) Eliminates the confirm step before the contents of the archive log are cleared.
persistent
(Optional) Purges the configuration logging persistent-command database entries.
Command Default
If this command is not used, the database entries accumulate in the archive log.
Command Modes
Privileged EXEC
Command History
Usage Guidelines
When the clear archive log config command is entered, only the entries in the configuration logging database file are deleted. The file itself is not deleted; it will be used in the future to log new entries as they occur.
Examples
The following example clears the database entries that have been saved to the config log without asking you to confirm the action before the entries are cleared:
Router# clear archive log config forceRelated Commands
Command Descriptionshow archive log config all persistent
Displays the persisted commands in configlet format.
(config-archive-log-cfg) logging persistent
To enable the configuration logging persistent feature and select how the configuration commands are to be saved to the Cisco IOS secure file system, use the logging persistent command the log config submode of archive configuration mode. To disable this capability, use the no form of this command.
logging persistent {auto | manual}
no logging persistent {auto | manual}
Syntax Description
Command Default
The configuration commands are not saved to the Cisco IOS secure file system.
Command Modes
(config-archive-log-cfg)
Archive configuration mode, log config (configuration-change logger) submode.Command History
Usage Guidelines
When you use the manual keyword, you must save each configuration command manually to the Cisco IOS secure file system. To do this, you must use the archive log config persistent save command.
To enable the logging persistent auto command, you must have disk0: configured and an external flash card inserted on the router.
Examples
The following example automatically saves the configuration commands to the Cisco IOS secure file system:
Router(config)# archiveRouter(config-archive)# log configRouter(config-archive-log-cfg)# logging enableRouter(config-archive-log-cfg)# logging persistent autoRelated Commands
debug archive log config persistent
To turn on debugging of configuration logging persistent events and display the results, use the debug archive log config persistent command in privileged EXEC mode. To disable the debugging and display of the archive events, use the no form of this command.
debug archive log config persistent
no debug archive log config persistent
Syntax Description
This command has no arguments or keywords.
Command Default
If this command is not entered, there is no debugging or display of the configuration logging persistent events in the archive.
Command Modes
Privileged EXEC
Command History
Usage Guidelines
The configuration logger feature must be enabled in order for the debug capability to work.
Examples
The following example turns on the debugging feature and displays the configuration logging persistent events:
Router# debug archive config log persistentRouter# archive log config persistent saveConfiguration logging persistent save triggered.Saving the config log to disk0:IOS-Config-Logger-database'.Command `interface eth0' savedCommand `ip address 10.1.1.1 255.255.255.0' savedCommand `no shut' savedRouter#Related Commands
Command Descriptionarchive log config persistent save
Saves the persisted commands in the configuration log to the Cisco IOS secure file system.
logging persistent reload
To sequentially apply the configuration commands saved in the configuration logger database (since the last write memory command) to the running-config file after a reload, use the logging persistent reload command in configuration change logger configuration mode in archive configuration mode. To disable this capability, use the no form of this command.
logging persistent reload
no logging persistent reload
Syntax Description
This command has no arguments or keywords.
Command Default
The configuration commands saved in the configuration logger database are not applied to the running-config file.
Command Modes
Configuration change logger configuration mode in archive configuration mode
Command History
Usage Guidelines
Use the logging persistent reload command when you want changed configuration commands to take effect on the next reload of the router.
Examples
The following example applies the configuration commands in the configuration logger database to the running-config file after the next reload:
Router(config-archive-log-cfg)# logging persistent reloadRelated Commands
show archive log config
To display entries from the configuration log, use the show archive log config command in privileged EXEC mode.
show archive log config {all | record-number [end-number] | user username [session session-number] record-number [end-number] | statistics} [provisioning] [contenttype {plaintext | xml}] [persistent]
Syntax Description
Command Modes
Privileged EXEC
Command History
Usage Guidelines
If you do not specify the all keyword, you must specify a record number with the record-number argument. You can optionally specify an end record number with the end-number argument to display a range of records. If you use the end-number argument to specify a record number that does not exist, all records after the starting record number with a record number lower than that specified with the end-number argument are displayed.
Specifying the provisioning keyword results in the display appearing as it would in a configuration file, rather than in tabular format. This output includes commands used to change configuration modes and logged configuration commands. This output can be used to set up another router if desired.
Examples
The following is sample output from the show archive log config command, which displays configuration log entry numbers 1 and 2:
Router# show archive log config 1 2
idx sess user@line Logged command1 1 user1@console logging enable2 1 user1@console logging size 200Table 1 describes the significant fields shown in the display.
The following example results in the display of all configuration log files as they would appear in a configuration file rather than in tabular format. In addition to displaying logged commands, the example shows the commands used to change configuration modes that are required to correctly apply the logged commands.
Router# show archive log config all provisioning
archivelog configlogging enablelogging size 200The following example results in the display of memory usage statistics for the configuration log:
Router# show archive log config statistics
Config Log Session Info:Number of sessions being tracked: 1Memory being held: 3910 bytesTotal memory allocated for session tracking: 3910 bytesTotal memory freed from session tracking: 0 bytesConfig Log log-queue Info:Number of entries in the log-queue: 3Memory being held in the log-queue: 671 bytesTotal memory allocated for log entries: 671 bytesTotal memory freed from log entries:: 0 bytesThe output is self-explanatory.
The following example shows the contents of the archive log in XML format:
Router# show archive log config all contenttype xml
<?xml version="1.0" encoding="UTF-8"?><configLoggerMsg version="1.0"><configChanged><changeInfo><user>jdoe</user><async><port>con_0</port></async><when><absoluteTime>2003-04-23T20:25:19.847Z</absoluteTime></when></changeInfo><logComment>begin test test1</logComment></configChanged><configChanged><changeInfo><user>jdoe</user><async><port>con_0</port></async><when><absoluteTime>2003-04-23T20:27:19.847Z</absoluteTime></when></changeInfo><changeItem><context/><enteredCommand><cli>interface e0</cli></enteredCommand><prcResultType><prcSuccess><change>PRC_CHANGE</change></prcSuccess></prcResultType><oldConfigState><cli></cli></oldConfigState><newConfigState><cli>interface e0</cli></newConfigState></changeItem></configChanged><configChanged><changeInfo><user>jdoe</user><async><port>con_0</port></async><when><absoluteTime>2003-04-23T20:28:19.847Z</absoluteTime></when></changeInfo><changeItem><context><cli>interface e0</cli></context><enteredCommand><cli>ip address 10.1.1.1 255.255.255.0</cli></enteredCommand><prcResultType><prcSuccess><change>PRC_CHANGE</change></prcSuccess></prcResultType><oldConfigState/><newConfigState><cli>ip address 10.1.1.1 255.255.255.0</cli></newConfigState></changeItem></configChanged><configChanged><changeInfo><user>jdoe</user><async><port>con_0</port></async><when><absoluteTime>2003-04-23T20:29:19.847Z</absoluteTime></when></changeInfo><logComment>end test test1</logComment></configChanged></configLoggerMsg>Feature Information for Configuration Logger Persistency
Table 2 lists the release history for this feature.
Cisco IOS software images are specific to a Cisco IOS software release, a feature set, and a platform. Use Cisco Feature Navigator to find information about platform support and Cisco IOS software image support. Access Cisco Feature Navigator at http://www.cisco.com/go/fn. You must have an account on Cisco.com. If you do not have an account or have forgotten your username or password, click Cancel at the login dialog box and follow the instructions that appear.
Note Table 2 lists only the Cisco IOS software release that introduced support for a given feature in a given Cisco IOS software release train. Unless noted otherwise, subsequent releases of that Cisco IOS software release train also support that feature.
Glossary
API—application programming interface.
CAF—command action function.
CDP—Cisco Discovery Protocol.
CSB—Command Status Block.
HA—high-availability architecture.
MIB—Management Information Base.
NAF—NVGEN action function.
NVGEN—nonvolatile generation.
NVRAM—nonvolatile Random Access Memory.
parse chain—A sequence of C language macros defining the syntax of a Cisco IOS command.
RP—Route Processor.
SNMP—Simple Network Management Protocol.
XML—eXtensible Markup Language.
Note See Internetworking Terms and Acronyms for terms not included in this glossary.
Any Internet Protocol (IP) addresses used in this document are not intended to be actual addresses. Any examples, command display output, and figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses in illustrative content is unintentional and coincidental.
© 2006-2007 Cisco Systems, Inc. All rights reserved.