Backing up the Cisco IOS for Router

Before upgrading or restoring the Cisco IOS, copy the existing file to a TFTP host as a backup. To perform this any TFTP host can used. By default, the flash memory in router is used to store the Cisco IOS.

Verifying Flash Memory

Before upgrading the Cisco IOS on a router with new IOS file, it is very important to verify the size of the flash memory to hold the new image. The amount of flash memory and file stored in flash memory can be verified by using show flash command (sh flash):

Router>sh flash
System flash directory:
File Length Name/status
3 5571584 c2500-js-l.112-28.bin
2 28282 sigdef-category.xml
1 227537 sigdef-default.xml
[5827403 bytes used, 58188981 available, 64016384 total]
63488K bytes of processor board System flash (Read/Write)

In this example the file name is c2500-js-1.112-18. bin. The file name can be derived as follows
C2500 is the platform.
  • J indicates that the file contains enterprise image.
  • S indicates the file contains extended capabilities.
  • L indicates that the file can be moved from flash memory if required or it be compressed.
  • 11.2-18 is the revision number.
  • bin indicates that the Cisco IOS is a binary executable file.
The output shows that the flash memory is 64016384 KB (64MB). So if the new file is 10MB in size, then there is enough space for new file. After verifying the flash memory size, user can continue with backup operation.

Backing up the Cisco IOS
The copy flash tftp command can be used to back up the Cisco IOS to a TFTP server. It is straight forward command which need only the file name and the IP address of the TFTP server.

Router#ping 192.168.1.11

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.12, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 47/55/63 ms

Note:The packetInternet Groper (ping) is used to test the network connectivity.

Use copy flash tftp command to copy IOS to the TFTP server after checking the TFTP server.

Router#copy flash tftp
Source filename []? c2800nm-advipservicesk9-mz.124-15.T1.bin
Address or name of remote host []? 192.168.1.12
Destination filename [c2800nm-advipservicesk9-mz.124-15.T1.bin]?

Writing c2800nm-advipservicesk9-mz.124-15.T1.bin...!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 50938004 bytes]

50938004 bytes copied in 10.753 secs (4737000 bytes/sec)

In the above example, the content of the flash memory is copied to TFTP server. The address of the remote host is the IP address of the TFTP server and source file-name is the file in flash memory.

0 comments:

Post a Comment