When you edit a configuration, you work in a copy of the current configuration to create a candidate configuration. The changes you make to the candidate configuration are visible in the CLI immediately, so if multiple users are editing the configuration at the same time, all users can see all changes.
To have a candidate configuration take effect, you commit the changes. At this point, the candidate file is checked for proper syntax, activated, and marked as the current, operational software configuration file. If multiple users are editing the configuration, when you commit the candidate configuration, all changes made by all users take effect.
For SRX devices running Junos Release 10.0 or later, the current operational Junos Software configuration is stored in a file named juniper.conf, and the last 5 committed configurations are stored in the files juniper.conf.1 through juniper.conf.5. If you create a rescue configuration, it is stored in a file named rescue.conf. These files are located in the /config directory, which is on the flash drive of the SRX Series device. To list the configuration files, use the file list /config operational mode command.
Note: The factory default for the maximum number of backup configurations allowed is 5. Increasing this backup configuration number results in increased memory usage on disk and increased commit time. For information about increasing the maximum number of backup configurations, refer to note section in Configuring the Device as a Junos OS Enforcer.
The following image illustrates the various Junos configuration states and configuration mode commands that can be used to load, commit, copy, save, or roll back the configuration:
To commit a configuration:
After you make configuration changes using J-Web, a Commit link appears in the J-Web interface (below the Troubleshoot tab). To commit your configuration changes, click Commit.
Committing a Configuration
Use the commit command to commit a configuration.
Use the commit and-quit command to commit a configuration and return to operational mode after the commit.
user@host# commit and-quit
Verifying the Candidate Configuration Without Committing It
To verity the candidate configuration syntax without committing it, use the commit check command. If the syntax is correct, a "configuration check succeeds" message appears. If there are errors in syntax, the errors are listed.
To verify configuration syntax:
user@host# commit check
Committing a Configuration with Confirmation Requirement
When you commit the current candidate configuration, an explicit confirmation for the commit is required for it to become permanent. This is useful if you want to verify that a configuration change works correctly and does not prevent access to the router. If the change prevents access or causes other errors, the router automatically returns to the previous configuration and restores access, after the rollback confirmation timeout passes.
This feature is known as automatic rollback. When using this feature, you have to specify the amount of time that is required to issue the commit or commit check command. The range is 1 through 65,535 minutes and the default is 10 minutes. If you do not provide confirmation before the time elapses, the configuration is automatically rolled back to the most recently committed configuration. For more information and an example, refer to Activating a Junos Configuration but Requiring Confirmation.
Committing a Configuration at a Specific Time
You can specify that the candidate configuration be committed at a specified time or when the device is rebooted. Use the commit at command with the reboot option or a specified time or date and time. Make sure to put reboot and the time or date and time in quotation marks (" ").
user@host# commit at "reboot" user@host# commit at "19:00" user@host#commit at "2010-02-15 19:00:00"