Roll back changes on your Cisco router with simple command
What happens if you've made changes to your router's configuration and something goes wrong? How can you get back to where you started? David Davis tells you about a command that helps you roll back changes while minimizing downtime.
Have you ever made changes to your Cisco router or switch and then needed to remove them? There are several ways to do this, but which is the safest and easiest method? Rebooting the router or switch isn't the answer. In fact, a simple command is a much better bet.
Let's say you're implementing some changes on a router that has a large configuration file. Maybe something distracted you when you were making the change, but the new feature doesn't work when you go to test it.
You just want to back everything out and start from scratch. How can you do that? You have a couple of options.
If you haven't saved the configuration yet, you can just reload the router. This will work, but you don't want to have to reload a production router. In addition, why should you wait for a router to reload if you don't have to?
You can also use the copy startup-config running-config command. However, this command doesn't do what you might think it does. It simply merges the commands from the startup-config with the running-config.
If there's a conflict, it leaves the commands in the running-config in place. What you then end up with is a mix of these configurations. In addition, it could also cause some downtime due to unpredictable results caused by mixing modifications with the old config.
How do you restore that startup-config without causing downtime? The configure replace command is the answer to this dilemma. This command takes the running-config and compares it to the replacement configuration. It finds the distinctions between the two configurations and applies only the differences. This command doesn't affect unchanged configurations, and it doesn't cause any downtime.
Typically, you replace the running-config with the startup-config located in the router's NVRAM. To do so, you would use the following command:configure replace nvram:startup-config
However, the last parameter could be any valid config file in the accepted Cisco IOS URL format. For example, the config you're using could actually be on a TFTP, FTP, HTTP, RCP, or SCP server. In that case, the command would look something like the following:
configure replace tftp://192.168.1.107/config-bu
Listing A offers a basic example of using the configure replace command. First, I shut down my FastEthernet4 interface, and then I used the configure replace nvram:startup-config command to replace my running-configuration with the startup-configuration. While this is an oversimplified example, it shows how the command works.
* Source : Techrepublic.com
Comments