To load, or roll back, a previous configuration file stored on the Services Router without activating it, use the rollback command:
-
rollback <string>
Replace string with a value from 0 through 49, or rescue (if a rescue configuration exists). The default value is 0.
When you commit a configuration, the Services Router saves the current operational version and the previous 49 versions of committed configurations. The most recently committed configuration is version 0 (the current operational version), and the oldest saved configuration is version 49.
If you have defined a rescue configuration, you can roll back to this configuration by entering rollback rescue. (You can also roll back to the rescue configuration or the default factory configuration by pressing the CONFIG button on the Services Router. For more information, see the J-series Services Router Getting Started Guide.)
To set the rescue configuration, see Setting or Deleting the Rescue Configuration with the CLI.
For more information about saved versions of configuration files, see Editing and Committing a Configuration.
To activate the configuration you loaded, you must commit it:
- [edit]
- user@host# rollback 2
- load complete
- [edit]
- user@host# commit
To display previous configurations, including the rollback number, date, time, name of the user who committed changes, and commit method, use the rollback ? command:
user@host# rollback ?
Possible completions: <[Enter]> Execute this command 0 2004-05-27 14:50:05 PDT by root via junoscript 1 2004-05-27 14:00:14 PDT by root via cli 2 2004-05-27 13:16:19 PDT by snmpset via snmp ... 28 2004-05-21 16:56:25 PDT by root via cli rescue 2004-05-27 14:30:23 PDT by root via cli | Pipe through a command
The access privilege level for using the rollback command is controlled by the rollback permission bit. Users for whom this permission bit is not set can return only to the most recently committed configuration. Users for whom this bit is set can return to any prior committed configuration. For more information, see the JUNOS System Basics Configuration Guide.