Copying an IOS Image to a Server


You want to save a backup copy of your IOS image on a TFTP server.


You can upload a copy of your router's IOS image to a TFTP server with the following set of commands:

Freebsd% touch /tftpboot/c2600-ik9o3s-mz.122-12a.bin
Freebsd% chmod 666 /tftpboot/c2600-ik9o3s-mz.122-12a.bin
Freebsd% telnet Router1
Connected to Router1.
Escape character is '^]'.

User Access Verification

Router1#copy flash:c2600-ik9o3s-mz.122-12a.bin tftp
Address or name of remote host []?
Destination filename [c2600-ik9o3s-mz.122-12a.bin]? 
11135588 bytes copied in 52.588 secs (211752 bytes/sec)



Before attempting to upgrade the IOS version of a router it's a good idea to save a copy of the current IOS image. This way, if an upgrade fails or if you have problems with the new IOS version, you can revert back to the old proven IOS version. The procedure to copy an IOS image to a TFTP server is very similar to the way we backed up a configuration file in Recipe 1.2. The only real difference is the size of the file involved, since IOS images are quite a bit larger than configuration files.

As we mentioned in Recipe 1.2, you have to watch out for the file permissions on your TFTP server. The transfer will fail if this file isn't world writable. We highly recommend that you remove the world-writable attribute on this file after uploading it. On Unix systems, you can use the chmod command to change the file attributes. This will ensure that the file isn't accidentally overwritten. Unlike configuration files, which you should never store in your TFTP directory, IOS images pose no security concerns, as long as they are not world writeable.

See Also

Recipe 1.2; Recipe 1.6

Cisco IOS Cookbook
Cisco IOS Cookbook (Cookbooks (OReilly))
ISBN: 0596527225
EAN: 2147483647
Year: 2004
Pages: 505
Simiral book on Amazon © 2008-2017.
If you may any questions please contact us: