How to Go Back to a Previous Junos Configuration
When you activate a new configuration, the Junos OS allows you to go back to a past configuration. When you have activated a new configuration, Junos 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.
To return to a configuration that Junos has automatically archived, use the rollback command in configuration mode:
 wiley@netnik# 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 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:
 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 by root via cli | Pipe through a command
Pick the configuration by date and time and specify the number in the rollback command to load that configuration:
 wiley@netnik# rollback 2 load complete
To reset the candidate configuration to the currently active configuration use the rollback (or rollback 0) command.
There is an additional option of restoring configurations; it shows you how to copy the currently active configuration or a previous one from the device to a file server on the network, as well as how to reload a configuration file onto the device.