Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 
New Member

reverting to original config

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.


VIP Super Bronze

With Cisco devices that run

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.


Hall of Fame Super Silver

Actually there are a set of

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:

Hope this helps - please rate helpful replies.

Hall of Fame Super Gold

It would be good if you have

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:

 log config
  logging enable
 path tftp://TFTP IP address/$h-
 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.  

Hall of Fame Super Gold

There is another tool that

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".  

CreatePlease to create content