Going Back to a Prior Configuration

When you activate a new configuration, the Junos operating system automatically keeps an archive of the previous active configuration. This automatic backup mechanism lets you return quickly to a previous configuration. You have several different options when you use the rollback command as discussed in this section.

Rolling back to a past configuration

To return to a configuration that Junos has automatically archived, use the rollback command in configuration mode:

[edit]
wiley@netnik# rollback 1
load complete

images This rollback command loads the previous configuration but stops short of activating it. If you need to change what's in the configuration, you can modify and review it, and then when you are ready to make the configuration active, enter the commit command.

In addition to archiving the last version of the configuration, Junos stores the last 50 active configurations. These files are on the device's flash and hard disk drives, so you can restore the configuration saved in a particular file.

Use the ? query with the rollback command to list the full archive:

[edit]
wiley@netnik# rollback ? Possible completions: <[Enter]> Execute this command 0 2011-09-01 12:34:56 PST by wiley via cli 1 2011-09-01 12:30:03 PST by wiley via cli 2 2011-09-01 14:23:44 PST by wiley via cli … 2011-08-03 08:00:12 PST by root via cli 2011-08-03 07:45:21 PST ...

Get Junos® OS For Dummies®, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.