Returning to a Previously Committed Configuration
To return to the most recently committed configuration and load it into configuration mode without activating it, use the
rollbackconfiguration mode command:[edit]user@host#rollbackload completeTo activate the configuration that you loaded, use the
commitcommand:[edit]user@host#rollbackload complete[edit]user@host#commitTo return to a configuration prior to the most recently committed one, include the number in the
rollbackcommand:[edit]user@host#rollbacknumberload complete
numbercan be a number in the range from 0 through 49. The most recently saved configuration is number 0 (which is the default configuration to which the system returns), and the oldest saved configuration is number 49.To display previous configurations, including rollback number, date, time, the name of the user who committed changes, and the method of commit, use the
rollback ?command:[edit]user@host#rollback ?Possible completions:<[Enter]> Execute this command<number> Numeric argument0 2001-02-27 12:52:10 PST by abc via cli1 2001-02-26 14:47:42 PST by cde via cli2 2001-02-14 21:55:45 PST by fgh via cli3 2001-02-10 16:11:30 PST by hij via cli4 2001-02-10 16:02:35 PST by klm via cli| Pipe through a command[edit]For more information about configuration versions, see How the Configuration Is Stored.
The access privilege level for using the
rollbackcommand is controlled by therollbackpermission 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 Configuring Access Privilege Levels.Example: Returning to a Previously Committed Version of the Configuration
Return to and activate the version stored in the file
juniper.conf.3:[edit]user@host#rollback 3load complete[edit]user@host#commit