Saving the Current Configuration
By default, the system automatically saves any change to the system configuration to nonvolatile storage (NVS). This feature is known as Automatic Commit mode, but has no effect on the CLI prompt. For more information about displaying the current configuration of the system while in Automatic Commit mode, see show configuration on 232.
You can disable this feature by issuing the service manual-commit command. In Manual Commit mode (again with no effect on the CLI prompt), any configuration change affects only the current system configuration (the running configuration). For more information about displaying the running configuration of the system while in Manual Commit mode, see show running-configuration on 234.
If you are in Manual Commit mode and want to save the configuration changes to NVS, you must issue either the write memory command or the copy running-configuration startup-configuration command.
If you change the configuration while in Manual Commit mode and issue the reload command without saving the changes to the startup configuration, the system provides a warning, allowing you to save the changes before reloading.
You can use the include-text-config keyword with the copy running-configuration command to add the text configuration to the system configuration file. If you change from commit mode to manual-commit mode, the configuration that is available at that point in time is written into the .cnf file. A Perl script is provided in the Tools folder on the E-series System Software CD shipped with your router that enables you to view the text configuration in a configuration file that contains both binary and text configuration. The Perl script supports multiple platforms. The UsageExtractScrFromCnf.txt file provides an explanation of how to extract the system configuration file, using the extractScrFromCnf.pl script.
NOTE: To avoid any discrepancies between the text-generated file and the system configuration file, do not change the configuration when the copy running-configuration command is running.
copy running-configuration
- Use to save the current configuration to a system configuration (*.cnf) file.
- Use the include-text-config keyword to add the text configuration to the system configuration file.
- This command is available only if the system is in Automatic Commit mode.
- The destination filename must have a .cnf extension.
- The destination file can be either a local or a network file.
- If you want to restore a previously saved configuration, use the boot config cnfFileName command.
- Example
host1#copy running-configuration system2.cnfThere is no no version. copy running-configuration startup-configuration
- Use to save all outstanding (unsaved) configuration changes to NVS.
- This command is an exact alias of the write memory command.
- This command is available if the system is in either Automatic Commit mode or Manual Commit mode. If issued while in Automatic Commit mode, the CLI notifies you that the command is not necessary, but allows you to proceed.
- If automatic synchronization between the primary and standby SRP modules is enabled (the default system behavior) and the system is in Manual Commit mode (the nondefault system behavior), issuing this command triggers file system synchronization immediately after the system writes, or commits, all outstanding configuration changes to NVS.
- This command is prevented during the high availability initialization state. If issued during this state, the CLI notifies you of the state and requests that you try again later.
- Example
host1#copy running-configuration startup-configurationThere is no no version. copy startup-configuration
- Use to copy the previously saved startup configuration to a system configuration (*.cnf) file. If you have made but not saved any configuration changes, those changes are not in the startup configuration.
- This command is available only if the system is in Manual Commit mode.
- Example
host1#copy startup-configuration system1.cnfThere is no no version. service manual-commit
- Use to stop the system from automatically saving configuration changes to NVS.
- Issuing this command places the system into Manual Commit mode. This mode has no effect on the CLI prompt.
- Issuing this command causes an immediate save of configuration data not yet committed to NVS.
- If issued when high availability is initializing, the CLI notifies you of the state and requests that you try again later.
- Example
host1(config)#service manual-commitThe no version returns the system to Automatic Commit mode; the no version has no effect if the system is already in Automatic Commit mode. write memory
- Use to save all outstanding (unsaved) configuration changes to NVS.
- This command is an exact alias of the copy running-configuration startup-configuration command.
- This command is available if the router is in either Automatic Commit mode or Manual Commit mode. If issued while in Automatic Commit mode, the CLI notifies you that the command is not necessary, but allows you to proceed.
- If automatic synchronization between the primary and standby SRP modules is enabled (the default system behavior) and the system is in Manual Commit mode (the nondefault system behavior), issuing this command triggers file system synchronization immediately after the system writes, or commits, all outstanding configuration changes to NVS.
- Example
host1#write memoryThere is no no version.