Junos OS

last person joined: 5 days ago 

Ask questions and share experiences about Junos OS.
  • 1.  Accessing a previous config

    Posted 02-18-2009 11:22

    hey all, is there a command to view a coniguration that was runnign on the router, say a week ago?

     

    i do not want to rollback. i just want to view the configuration.

     

    thanks

    -robert



  • 2.  RE: Accessing a previous config
    Best Answer

    Posted 02-18-2009 12:01

    List the rollback revisions:

    [edit]

    root@fenrir# rollback ?

     

     

    View a particular revision:

    root@fenrir> show system rollback x

     

    where x  is the revision you want to view

     

     

    Compare a revision to the current revision:

    [edit]

    root@fenrir# show | compare rollback x

     

    One could also use Subversion, etc to keep copies of the config files off-router as well.



  • 3.  RE: Accessing a previous config

    Posted 02-18-2009 12:10

    JUNOS software makes a copy of the running configuration, and keeps it in an archive of 50 previous configurations (default). The following commands to help you out ....

     

    jahil@R1> file list /var/db/config/ recursive

    jahil@R1> file list /config/ recursive

     

    You will get the output as shown below which is quite enough to identify whatever configuration you are looking for..

     

    -rw-r-----  1 root  wheel       2760 Feb 19 00:24 juniper.conf.10.gz
    -rw-r-----  1 root  wheel       2755 Feb 19 00:19 juniper.conf.11.gz
    -rw-r-----  1 root  wheel       2722 Feb 19 00:18 juniper.conf.12.gz
    -rw-r-----  1 root  wheel       2727 Feb 19 00:18 juniper.conf.13.gz
    -rw-r-----  1 root  wheel       2723 Feb 19 00:16 juniper.conf.14.gz
    -rw-r-----  1 root  wheel       2748 Feb 19 00:16 juniper.conf.15.gz


    JUNOS way to display file on your screen.

     

    jahil@R1> file show /var/db/config/juniper.conf.10.gz

     

     

    HTH

    Message Edited by masoodnt10 on 02-19-2009 01:12 AM


  • 4.  RE: Accessing a previous config

    Posted 02-18-2009 13:42

    Adding to what others have already provided.  You can request arbitrary diffs between versions, with the following command in operational command mode (not edit).

     

     show system rollback compare <config1> <config2>

     

    Where <config1> and <config2> are the numbers output by "show system commit".  This can help you narrow down exactly when a particular change was made.

     

    Regards,

    Ben


    #tips