×

Warning message

  • Cisco Support Forums is in Read Only mode while the site is being migrated.
  • Cisco Support Forums is in Read Only mode while the site is being migrated.

reverting to original config

Unanswered Question
Apr 13th, 2014
User Badges:

Hello, say I make a change to the config of a router or switch, such as the addition of new lines.

If I then decide I want to revert to the original config, I understand that I can just paste the original config back in via the terminal.

However doing this does not get rid of the additional lines I had added in.

Apart from manually deleting those new lines ,is there another way to revert back to the original config apart from reloading ?

 

Thanks kindly.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
Reza Sharifi Sun, 04/13/2014 - 14:05
User Badges:
  • Super Bronze, 10000 points or more
  • Cisco Designated VIP,

    2017 LAN

With Cisco devices that run IOS, IOS, XE, etc.. it works they way you described it.  You basically have to delete the lines with a no command or if you have not saved the config yet, a reload would put the switch or the router into the state that was before you add the lines. 

If you are using devices that run IOS XR, they have added the commit and rollback command.

So, if you make a change and save the config, you can roll it back to the original state.

Unfortunately, Cisco IOS has always lac this feature.  If you are using any Juniper device, you can roll back up to 49 times.

It is really a cool feature to have handy when you need it.

HTH

Marvin Rhoads Sun, 04/13/2014 - 16:34
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,
  • Cisco Designated VIP,

    2017 Firewalling, Network Management, VPN

Actually there are a set of tools in Cisco IOS that allow this after a fashion. It's not quite as slick as JunOS's commit and revert functions but have a look at "archive" and "configure replace" toolset. It's been around for a couple of years but I've not seen many engineers use it. Perhaps because it's not covered in the certification guides. :)

There are several nice blog articles on third party sites that discuss it in some detail:

http://packetpushers.net/cisco-configuration-archive-rollback-using-reve...

http://packetlife.net/blog/2010/feb/19/soho-configuration-management/

http://www.packetu.com/2013/05/14/understanding-the-cisco-configure-repl...

Hope this helps - please rate helpful replies.

Leo Laohoo Sun, 04/13/2014 - 21:33
User Badges:
  • Super Gold, 25000 points or more
  • Hall of Fame,

    The Hall of Fame designation is a lifetime achievement award based on significant overall achievements in the community. 

  • Cisco Designated VIP,

    2017 LAN, Wireless

It would be good if you have a TFTP server (Linux-based would be very nice).  Because if you do, then you can do add the following lines:

archive
 log config
  logging enable
  hidekeys
 path tftp://TFTP IP address/$h-
 write-memory
 time-period 10080

The command above means that whenever someone saves the config, a copy is sent straight to the TFTP server.  Alternatively, a copy of the latest config is saved into the TFTP server every 7 days (time-period 10080).

 

Now back to your question, say you got the above config running and you've got the latest config.  Now you've done some configuration changes and you "don't like them".  The easiest way to revert will be to delete the startup-config in your appliance and copy the latest config (found in your TFTP server) back to your appliance's startup config.  

Leo Laohoo Sun, 04/13/2014 - 21:36
User Badges:
  • Super Gold, 25000 points or more
  • Hall of Fame,

    The Hall of Fame designation is a lifetime achievement award based on significant overall achievements in the community. 

  • Cisco Designated VIP,

    2017 LAN, Wireless

There is another tool that you can use and this will be dependent on how old/new your IOS is.  The command is "sh archive config difference file_1 file_2".  

Actions

This Discussion