Switching

 View Only
last person joined: yesterday 

Ask questions and share experiences about EX and QFX portfolios and all switching solutions across your data center, campus, and branch locations.
  • 1.  Discarding uncommitted changes

    Posted 05-16-2011 09:05

    Hello,

     

    Quick question. If I inadvertently make some changes to the config and I want to discard those changes, do I just exit configuration mode? When I exit configuration mode with the changes be discarded from the candidate configuration? Or are there additional steps that need to be taken?

     

    Thanks in advance. 



  • 2.  RE: Discarding uncommitted changes
    Best Answer

    Posted 05-16-2011 09:14

    Hello,

    Do this _before_ exiting config mode

     

     

    rollback 0

     

     

    And then exit.

    HTH

    Rgds

    Alex



  • 3.  RE: Discarding uncommitted changes

    Posted 05-16-2011 09:32

    thanks for the reply, here is the output of a show|compare rollback 0

     

    root@switch# show | compare rollback 0

     

    [edit interfaces ge-5/0/19 unit 0 family ethernet-switching]
    -      port-mode access;
    +      port-mode trunk;
    [edit interfaces ge-5/0/19 unit 0 family ethernet-switching vlan]
    -       members VlanXX;
    +       members [ VlanXX YY ];
    [edit protocols]
    +   stp;
    so basically these changes aren't yet commited and will be discarded correct?  thanks again!

     



  • 4.  RE: Discarding uncommitted changes

    Posted 05-16-2011 09:42

    Yes - that is correct - rollback 0 replaces the "candidate" config (the one you are editing) with the active config (same as the boot config). You can also do rollback "n" where n = a prior active config. JUNOS stores up to 50 prior configs (6 on some platforms)



  • 5.  RE: Discarding uncommitted changes

    Posted 05-16-2011 09:46

    perfect, thanks.  i appreciate the insight. 



  • 6.  RE: Discarding uncommitted changes

    Posted 04-05-2018 17:47

    The sort answer to your question is yes, exiting config before committing will discard the candidate config. The answers given below are the cleaner way to achieve what you are asking though.



  • 7.  RE: Discarding uncommitted changes

    Posted 10-26-2021 05:41

    Not necessarily - depending what configuration mode you are already in.

    If you are in "normal" config mode your uncommitted changes are RETAINED - a rollback 0 will remove the configs in the candidate file

    If you are in "exclusive" mode, uncommitted changes are always discarded if you log out

    If you are in "private" mode, again your uncommitted changes are discarded if you log out. Remember if you want to COMMIT your changes in this mode you have to be at the TOP hierarchical level