Overview of Saving the Current System 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 Monitoring the Current Configuration of the System in Auto Commit Mode.

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 Monitoring the Current Configuration of the System in Manual Commit Mode.

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 in compressed format. Storing the text configuration in compressed format reduces the size of the system configuration file and the amount of space that the file occupies on the local flash card or network host. 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 of the software image bundle that you can download from the Juniper Networks website, depending on whether you want to install the software on an ERX model or an E120 and E320 model, 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 “Usage and Troubleshooting document for desktop tool” file in PDF format provides an explanation of how to extract the system configuration file, using the extractScrFromCnf.pl script. For more information about using the Perl script, see Using the Desktop Tool for Viewing the Uncompressed Text Configuration.

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.

Related Documentation