4.17 Returning to a Previous Configuration


The ability to save nine previously committed configuration files is quite useful. This feature allows you to have the router rollback to a previous configuration with remarkable ease. The example below explains the use of the rollback command, lists the possible completions, and shows a sample output from using the feature. In this example, the user lab types rollback 2 . The result of this command is that the router loads the second-to-last saved configuration file as the candidate configuration. Thus, a commit must be performed after the configuration file is loaded for the changes to take effect. Notice that after the commit is performed, the router system name has changed to test .

 [edit]  lab@Chicago# rollback 2 load complete lab@Chicago# commit commit complete [edit] lab@test# 

Note

When using the rollback command without a number, the router will go back to the last committed configuration, regardless of any unsaved changes. Before using the rollback command, you can view the contents of the saved files by using the file show command. This can be useful in helping you to rollback to a specific configuration file. Also, using the show command with rollback compare can be helpful in displaying the differences between the current candidate configuration and the previously saved configuration. The following example shows the output from of a show compare rollback 0 . The differences are identified by the + (added) and “ (removed) signs. These actions will take place, if the file is committed.


 [edit]  lab@Chicago# show  compare rollback 0 version 5.1R1.4; system { -    host-name Chicago; +    host-name replace_Chicago 


Juniper Networks Reference Guide. JUNOS Routing, Configuration, and Architecture
Juniper Networks Reference Guide: JUNOS Routing, Configuration, and Architecture: JUNOS Routing, Configuration, and Architecture
ISBN: 0201775921
EAN: 2147483647
Year: 2002
Pages: 176

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