The 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.
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 at the end of this module.
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.
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, Release 12.2(33)SXH, or Release 12.2(33)SB installed on your system.
Information About Configuration Logger Persistency
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 writememory command or copyurl 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:
Enable configuration logger notification to syslog
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
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.
Router(config-archive-log-cfg)# logging persistent auto
Enables the Configuration Logger Persistency feature:
The
auto keyword specifies that each configuration command will be saved automatically to the Cisco IOS secure file system.
The
manual keyword specifies that you can save the configuration commands to the Cisco IOS secure file system on-demand. To do this, you must use the
archivelogconfigpersistentsave command.
Note
To enable the
loggingpersistentauto command, you must have disk0: configured and an external flash card inserted on the router.
Sequentially applies the configuration commands saved in the configuration logger database (since the last
writememorycommand) to the running-config file after a reload.
Step 7
loggingsizeentries
Example:
Router(config-archive-log-cfg)# logging size 10
Specifies the maximum number of entries retained in the configuration log.
Valid values range from 1 to 1000.
The default value is 100 entries.
Verifying and Troubleshooting the Configuration Logger Persistency Feature
Three 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.showarchivelogconfigpersistent
2.cleararchivelogconfigpersistent
3.archivelogconfigpersistentsave
4.debugarchivelogconfigpersistent
DETAILED STEPS
Step 1
showarchivelogconfigpersistent
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:
Example:
Router# show archive log config persistent
!Configuration logger persistentarchive
log config
logging persistent auto
logging persistent reload
archive
log config
logging size 10
logging console
interface loop 101
ip address 10.1.1.1 255.255.255.0
ip address 10.2.2.2 255.255.255.0
no shutdown
Step 2
cleararchivelogconfigpersistent
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.
This command saves the configuration log to the Cisco IOS secure file system. For this command to work, the archivelogconfigpersistentsavecommand must be configured.
Step 4
debugarchivelogconfigpersistent
This command turns on the debugging function. A message is returned to indicate that debugging is turned on.
Example:
Router# debug archive log config persistent
debug archive log config persistent debugging is on
Configuration Examples for the Configuration Logger Persistency Feature
Configuration Logger Persistency Configuration on a Cisco 7200 Series Router Example
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 writememorycommand) are applied sequentially to the running-config file, and the maximum number of entries retained in the configuration log is set to 10:
Router> enable
Router# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)# archive
Router(config-archive)# log config
Router(config-archive-log-config)# logging persistent auto
configuration log persistency feature enabled. Building configuration... [OK]
Router(config-archive-log-config)# logging persistent reload
Router(config-archive-log-config)# logging size 10
Router(config-archive-log-config)# archive log config persistent save
Router(config-archive-log-config)# end
Router#
Additional References
The following sections provide references related to the Configuration Logger Persistency feature.
No new or modified RFCs are supported by this feature.
--
Technical Assistance
Description
Link
The Cisco Support website provides extensive online resources, including documentation and tools for troubleshooting and resolving technical issues with Cisco products and technologies.
To receive security and technical information about your products, you can subscribe to various services, such as the Product Alert Tool (accessed from Field Notices), the Cisco Technical Services Newsletter, and Really Simple Syndication (RSS) Feeds.
Access to most tools on the Cisco Support website requires a Cisco.com user ID and password.
Feature Information for Configuration Logger Persistency
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.
Table 1 Feature Information for Configuration Logger Persistency
Feature Name
Releases
Feature Information
Configuration Logger Persistency
12.2(33)SRA
12.4(11)T
12.2(33)SXH
12.2(33)SB
Cisco IOS XE Release 3.9S
The Configuration Logger Persistency feature increases the operational robustness of Cisco configuration and provisioning actions by implementing a “quick-save” functionality.
Effective with Cisco IOS Release 12.2(33)SRA, Release 12.4(11)T, Release 12.2(33)SXH, and Release 12.2(33)SB, Cisco software saves just the commands entered since the last startup-config file was generated, rather than saving the entire startup configuration.
This feature was integrated into Cisco IOS XE Release 3.9S.
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.
parsechain--A sequence of C language macros defining the syntax of a Cisco IOS command.