Loading a Previous Router Configuration

Problem

You need to undo the active router configuration and return to a previous configuration.

Solution

The rollback configuration mode command loads a previous router configuration as the candidate configuration:

	[edit]
	aviva@router1# rollback 1
	load complete
	[edit]
	aviva@router1# show
	[edit]
	aviva@router1# commit
	commit complete

 

Discussion

You can reload any of the previously committed versions of the configuration file. You identify the version by the number, which is the number in the filename. In this example, we reload the last saved configuration file, /config/juniper.conf.1.gz. The rollback command only loads the configuration, making it the candidate configuration, but does not activate it. The commit command activates the retrieved configuration. While using the show command here is optional, it's good practice to verify that the configuration you loaded is what you expect.

To figure out which previous configuration you want to retrieve, you can use a few commands that we have already discussed, including show system commit and file list detail /config. You can use the file list detail /var/db/config command to find out when the older configuration files were activated and by whom. You can also see this information when you issue the rollback command by using the router's built-in help:

	[edit]
	aviva@router1# rollback ?
	Possible completions:
	 <[Enter]> Execute this command
	 0 2005-02-25 12:31:52 PST by aviva via cli
	 1 2005-02-25 10:45:12 PST by aviva via cli commit at
	 2 2005-02-25 03:10:21 PST by root via cli
	…
	 48 2005-02-19 03:01:04 PST by root via cli
	 49 2005-02-18 18:24:21 PST by aviva via cli
	 | Pipe through a command

 

See Also

Recipes 1.10, 1.14, and 1.18


Router Configuration and File Management

Basic Router Security and Access Control

IPSec

SNMP

Logging

NTP

Router Interfaces

IP Routing

Routing Policy and Firewall Filters

RIP

IS-IS

OSPF

BGP

MPLS

VPNs

IP Multicast



JUNOS Cookbook
Junos Cookbook (Cookbooks (OReilly))
ISBN: 0596100140
EAN: 2147483647
Year: 2007
Pages: 290
Authors: Aviva Garrett

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net