Skip to main content

Backing Up and Restoring Cisco Configuration


Backing Up the Cisco Router Configuration
To copy the router’s configuration from a router to a TFTP server, you can use either the copy running-config tftp or the copy startup-config tftp command. Either one will back up the router configuration that’s currently running in DRAM, or that’s stored in NVRAM.
Verifying the Current Configuration
To verify the configuration in DRAM, use the show running-config command (sh run for short) like this:
Router#sh run
Building configuration…
Current configuration:
!
version 12.0
The current configuration information indicates that the router is now running version 12.0 of the IOS.
Verifying the Stored Configuration
Next, you should check the configuration stored in NVRAM. To see this, use the show startup-config command (sh start for short) like this:
Router#sh start
Using 366 out of 32762 bytes
!
version 11.2
The second line shows you how much room your backup configuration is using. Here, we can see that NVRAM is 32KB and that only 366 bytes of it are used.
Copying the Current Configuration to NVRAM
By copying running-config to NVRAM as a backup, as shown in the following output, you’re assured that your running-config will always be reloaded if the router gets rebooted. In the new IOS version 12.0, you’re prompted for the filename you want to use. And since the version of IOS was 11.2 the last time a copy run start was performed, the router will tell us that it’s going to replace that file with the new 12.0 version:


Router#copy run start
Destination filename [startup-config]?[Enter]
Warning: Attempting to overwrite an NVRAM configuration previously written by a different version of the system image.
Overwrite the previous NVRAM configuration?[confirm][Enter]
Building configuration… [OK]
Now when you run show startup-config, the version shows 12.0:

Router#sh start
Using 487 out of 32762 bytes
!
version 12.0
Copying the Configuration to a TFTP Server
Once the file is copied to NVRAM, you can make a second backup to a TFTP server by using the copy running-config tftp command (copy run tftp for short), like this:

Router#copy run tftp
Address or name of remote host []?192.168.0.120
Destination filename [router-confg]?backup-config
!!
487 bytes copied in 12.236 secs (40 bytes/sec)
Router#
Notice that this took only two exclamation points (!!)–which means that 20 packets have been transferred (10 for each exclamation point).
Restoring the Cisco Router Configuration
If you’ve changed your router’s running-config file and want to restore the configuration to the version in the startup-config file, the easiest way to do this is to use the copy startup-config running-config command (copy start run for short). You can also use the older Cisco command config mem to restore a configuration. Of course, this will work only if you first copied running-config into NVRAM before making any changes!
If you did copy the router’s configuration to a TFTP server as a second backup, you can restore the configuration using the copy tftp running-config command (copy tftp run for short) or the copy tftp startup-config command (copy tftp start for short), as shown below (remember that the old command that provides this function is config net):
Router#copy tftp run
Address or name of remote host []?192.168.0.120
Source filename []?backup-config
Destination filename [running-config]?[Enter]
Accessing tftp://192.168.0.120/backup-config…
Loading backup-config from 192.168.0.120 (via Ethernet0):
!!
[OK - 487/4096 bytes]
487 bytes copied in 5.400 secs (97 bytes/sec)
Router#
00:38:31: %SYS-5-CONFIG: Configured from
tftp://192.168.0.120/backup-config

Router#

The configuration file is an ASCII text file, meaning that before you copy the configuration stored on a TFTP server back to a router, you can make changes to the file with any text editor.
Erasing the Configuration
To delete the startup-config file on a Cisco router, use the command erase startup-config, like this:

Router#erase startup-config
Erasing the nvram filesystem will remove all files! Continue? [confirm][Enter]
[OK]
Erase of nvram: complete
Router#
This command deletes the contents of NVRAM on the router, so the next time the router boots, it’ll run the setup mode.

Comments

Popular posts from this blog

[韓日関係] 首相含む大幅な内閣改造の可能性…早ければ来月10日ごろ=韓国

div not scrolling properly with slimScroll plugin

I am using the slimScroll plugin for jQuery by Piotr Rochala Which is a great plugin for nice scrollbars on most browsers but I am stuck because I am using it for a chat box and whenever the user appends new text to the boxit does scroll using the .scrollTop() method however the plugin's scrollbar doesnt scroll with it and when the user wants to look though the chat history it will start scrolling from near the top. I have made a quick demo of my situation http://jsfiddle.net/DY9CT/2/ Does anyone know how to solve this problem?

Why does this javascript based printing cause Safari to refresh the page?

The page I am working on has a javascript function executed to print parts of the page. For some reason, printing in Safari, causes the window to somehow update. I say somehow, because it does not really refresh as in reload the page, but rather it starts the "rendering" of the page from start, i.e. scroll to top, flash animations start from 0, and so forth. The effect is reproduced by this fiddle: http://jsfiddle.net/fYmnB/ Clicking the print button and finishing or cancelling a print in Safari causes the screen to "go white" for a sec, which in my real website manifests itself as something "like" a reload. While running print button with, let's say, Firefox, just opens and closes the print dialogue without affecting the fiddle page in any way. Is there something with my way of calling the browsers print method that causes this, or how can it be explained - and preferably, avoided? P.S.: On my real site the same occurs with Chrome. In the ex