Archiving Configurations

When you activate a new configuration, the Junos OS software automatically keeps an archive of the previous active configuration. This automatic backup mechanism lets you return quickly to a previous configuration using the rollback command. In addition, you can copy the currently active configuration or a previous configuration from the router to a file server on the network, and if you need to return to a backed-up version, you can manually reload and restore the configuration file onto the router.

Using the rollback command

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

[edit]
user@host-name# rollback 1
load complete

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 it. To see what statements are in the configuration, use the configuration mode show command:

[edit]
user@host-name# show

images The show command displays all the statements in a configuration one screen at a time. To see the next screen, press Enter or the spacebar.

When you're ready to activate the configuration, use the commit command:

[edit]
user@host-name# commit
commit complete

Restoring the full archive

In addition to archiving the last version of the configuration, the Junos OS software stores ...

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.