Backing Up and Restoring Cisco IOS Software and Configurations
This chapter provides information and commands concerning the following topics:
• Boot system commands
• The Cisco IOS File System
• Backing up configurations to a TFTP server
• Restoring configurations from a TFTP server
• Backing up the Cisco IOS Software to a TFTP server
• Restoring/upgrading the Cisco IOS Software from a TFTP server
• Restoring the Cisco IOS Software from ROM Monitor mode using Xmodem
• Restoring the Cisco IOS Software using the ROM Monitor environmental variables and tftpdnld command
Boot System Commands
|
Router(config)#boot system flash imagename |
Loads the Cisco IOS Software with image-name. |
|
Router(config)#boot system tftp image-name 172.16.10.3 |
Loads the Cisco IOS Software with image-name from a TFTP server. |
|
Router(config)#boot system rom |
Loads the Cisco IOS Software from ROM. |
|
Router(config)#exit |
|
|
Router#copy running-config startup-config |
Saves the running configuration to NVRAM. The router will execute commands in their order on the next reload. |
If you enter boot system flash first, that is the first place the router will go to look for the Cisco IOS Software. If you want to go to a TFTP server first, make sure that the boot system tftp command is the first one you enter.
The Cisco IOS File System
NOTE: The Cisco IOS File System (IFS) provides a single interface to all the file systems available on a routing device, including the flash memory file system; network file systems such as TFTP, Remote Copy Protocol (RCP), and File Transfer Protocol (FTP); and any other endpoint for reading and writing data, such as NVRAM, or the running configuration.
The Cisco IFS minimizes the required prompting for many commands. Instead of entering in an EXEC-level copy command and then having the system prompt you for more information, you can enter a single command on one line with all necessary information.
|
Cisco IOS Software Commands |
IFS Commands |
|
copy tftp running-config |
copy tftp: system:running-config |
|
copy tftp: nvram:startup-config |
|
|
show startup-config |
more nvram:startup-config |
|
erase startup-config |
|
|
copy running-config startup-config |
copy system:running-config nvram:startup-config |
|
copy system:running-config tftp: |
|
|
show running-config |
more system:running-config |
Backing Up Configurations to a TFTP Server
|
Denver#copy running-config startup-config |
Saves the running configuration from DRAM to NVRAM (locally). |
|
Denver#copy running-config tftp |
Copies the running configuration to the remote TFTP server. |
|
Address or name of remote host[ ]? 192.168.119.20 |
The IP address of the TFTP server. |
|
Destination Filename [Denver-confg]?®Entsr| |
The name to use for the file saved on the TFTP server. |
|
iiiiiiiiiiiiiii |
Each bang symbol (!) = 1 datagram of data. |
|
624 bytes copied in 7.05 secs |
|
|
Denver# |
File has been transferred successfully. |
|
NOTE: You can also use the preceding sequence for a copy startup-config tftp command sequence. |
|
|
Restoring Configurations from a TFTP Server |
|
|
Denver#copy tftp running-config |
Copies the configuration file from the TFTP server to DRAM. |
|
Address or name of remote host[ ]? 192.168.119.20 |
The IP address of the TFTP server. |
|
Source filename [ ]?Denver-confg |
Enter the name of the file you want to retrieve. |
|
Destination filename [running-config]? ®Entsrl |
|
|
Accessing tftp://192.168.119.20/Denver-confg... |
|
|
Loading Denver-confg from 192.168.119.02 (via Fast Ethernet 0/0): |
|
|
iiiiiiiiiiiiii |
|
|
[OK-624 bytes] |
|
|
624 bytes copied in 9.45 secs |
|
|
Denver# |
File has been transferred successfully. |
NOTE: You can also use the preceding sequence for a copy tftp startup-config command sequence.
Backing Up the Cisco IOS Software to a TFTP Server
|
Denver#copy flash tftp |
|
|
Source filename [ ]? c2600-js-l_121-3.bin |
Name of the Cisco IOS Software image. |
|
Address or name of remote host [ ]? 192.168.119.20 |
The address of the TFTP server. |
|
Destination filename [c2600-js-l_121-3.bin]? (Enter! |
The destination filename is the same as the source filename, so just press f Enter]. |
|
llllllllllllllllllllllllllllllllllllllllllllll |
|
|
llllllllllllllllllllllllllllllllllllll |
|
|
8906589 bytes copied in 263.68 seconds |
|
|
Denver# |
Restoring/Upgrading the Cisco IOS Software from a TFTP Server
|
Denver#copy tftp flash |
|
|
Address or name of remote host [ ]? 192.168.119.20 |
|
|
Source filename [ ]? c2600-js-l_121-3.bin |
|
|
Destination filename [c2600-js-l_121-3.bin]? |
|
|
Accessing tftp://192.168.119.20/c2600-js-l_121-3.bin |
|
|
Erase flash: before copying? [confirm] ( |
If flash memory is full, erase it first. |
|
Erasing the flash file system will remove all files |
|
|
Continue? [confirm] (Enter! |
Press S-C if you want to cancel. |
|
Erasing device eeeeeeeeeeeeeeeeee...erased |
Each e represents data being erased. |
|
Loading c2600-js-l_121-3.bin from 192.168.119.20 |
|
|
(via) FastEthernet 0/0): iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii |
Each bang symbol (!) = 1 datagram of data. |
|
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii |
|
|
!!! |
|
|
Verifying Check sum OK |
|
|
[OK - 8906589 Bytes] |
|
|
8906589 bytes copied in 277.45 sees |
|
|
Denver# |
Success. |
Restoring the Cisco IOS Software from ROM Monitor Mode Using Xmodem
The output that follows was taken from a 1720 router. Some of this output might vary from yours, depending on the router model that you are using.
|
Shows the configuration summary. Step through the questions, answering defaults until you can change the console baud rate. Change it to 115200; it makes transfer go faster. |
|
|
Configuration Summary enabled are: load rom after netboot fails console baud: 9600 boot: image specified by the boot system commands or default to: cisco2-c1700 |
|
do you wish to change the configuration? y/n [n]: y enable "diagnostic mode"? y/n [n]: n enable "use net in IP bcast address"? y/n [n]: n disable "load rom after netboot fails"? y/n [n]: n enable "use all zero broadcast"? y/n [n]: n enable "break/abort has effect"? y/n [n]: n enable "ignore system config info"? y/n [n]: n change console baud rate? y/n [n]: y enter rate: 0=9600, 1=4800, 2=1200, 3=2400 change the boot characteristics? y/n [n]: n |
Prompts begin to ask a series of questions that allow you to change the configuration register. Answer n to all questions except the one that asks you to change the console baud rate. For the enter rate, choose 7 because that is the number that represents a baud rate of 115200. |
|
Configuration Summary enabled are: load rom after netboot fails console baud: 115200 boot: image specified by the boot system commands or default to: cisco2-c1700 do you wish to change the configuration? y/n [n]: n rommon2> |
After the summary is shown again, choose n to not change the configuration and go to the rommon> prompt again. |
|
rommon 2>reset |
Reloads the router at the new com speed. Change the HyperTerminal setting to 115200 to match the router's new console setting. |
|
Rommon 1>xmodem c1700-js-l_121-3.bin |
Asking to transfer this image using Xmodem. |
|
...<output cut>... |
|
Do you wish to continue? y/n [n ]:y |
Choose y to continue. |
|
In HyperTerminal, go to Transfer, then Send File (see Figure 16-1). Locate the Cisco IOS Software file on the hard drive and click Send (see Figure 16-2). |
|
|
Router will reload when transfer is completed. |
|
|
Reset baud rate on router. |
|
|
Router(config)#line con 0 |
|
|
Router(config-line)#speed 9600 |
|
|
Router(config-line)#exit |
HyperTerminal will stop responding. Reconnect to the router using 9600 baud, 8-N-1. |
Figure 16-1 Finding the Cisco IOS Software Image File
Figure 16-1 Finding the Cisco IOS Software Image File
Figure 16-2 Sending the Cisco IOS Software Image File to the Router
|
■ Send File E® |
|
|
Folder C:\DccumertsandSeitrgs\Dad |
|
|
Fienare: |
|
|
|c \ios\c17Ü0-y-mz.120-1XM |
1 Browe,,, ] |
|
Piotocol; |
|
|
1 Zmodem wilh Ciwh Ftecovefy |
Ml |
Restoring the Cisco IOS Software Using the ROM Monitor Environmental Variables and tftpdnld Command
|
rommon 1>IP_ADDRESS=192.168.100.1 |
Indicates the IP address for this unit. |
|
rommon 2>IP_SUBNET_MASK=255.255.255.0 |
Indicates the subnet mask for this unit. |
|
rommon 3>DEFAULT_GATEWAY=192.168.100.1 |
Indicates the default gateway for this unit. |
|
rommon 4>TFTP_SERVER=192.168.100.2 |
Indicates the IP address of the TFTP server. |
|
rommon 5>TFTP_FILE= c2600-js-l_121-3.bin |
Indicates the filename to fetch from the TFTP server. |
|
rommon 6>tftpdnld |
Starts the process. |
|
...<output cut>... |
|
|
Do you wish to continue? y/n: [n]:y |
|
|
...<output cut>... |
|
|
Rommon 7>i |
Resets the router. The i stands for initialize. |
NOTE: Commands and environmental variables are case sensitive, so be sure that you have not accidentally added spaces between variables and answers.
chapter 17
Continue reading here: Password Recovery Procedures and the Configuration Register
Was this article helpful?
Readers' Questions
-
nelma3 months ago
- Reply
-
Elaine7 months ago
- Reply
-
awet8 months ago
- Reply
-
luca8 months ago
- Reply
-
osman mustafa8 months ago
- Reply