Backing Up the Running-Config and IOS

Backing Up the Running-Config and IOS

Backing Up the Running-Config and IOS

It's always good practice to backup your router or switch configuration and IOS image. In this post I'll show you how to back these up to a TFTP server.

Backing up the Running-Config

To backup the running-config to a TFTP server, use the copy running-config tftp command:

Router#copy running-config tftp
Address or name of remote host []? 192.168.1.100
Destination filename [router-confg]? router-backup.txt
!!
776 bytes copied in 0.412 secs (1883 bytes/sec)

The router will prompt you for:

  • The IP address of your TFTP server
  • The filename to save the configuration as

Backing up the IOS Image

To backup the IOS image to a TFTP server, first identify the current IOS filename using show flash:

Router#show flash

System flash directory:
File  Length   Name/status
  1   13937472 c1841-advipservicesk9-mz.124-15.T1.bin
  2   1821      info
[26738688 bytes used, 5889024 available, 32627712 total]
32768K bytes of processor board System flash (Read/Write)

Then use the copy flash tftp command to backup the IOS:

Router#copy flash tftp
Source filename []? c1841-advipservicesk9-mz.124-15.T1.bin
Address or name of remote host []? 192.168.1.100
Destination filename [c1841-advipservicesk9-mz.124-15.T1.bin]? 
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
13937472 bytes copied in 67.016 secs (208000 bytes/sec)

Setting up a TFTP Server

You'll need a TFTP server running on your network. Popular free TFTP servers include:

  • Tftpd32 (Windows)
  • SolarWinds TFTP Server (Windows)
  • Built-in TFTP service (Linux/Mac)

Make sure the TFTP server is running and accessible from your router or switch before attempting the backup.

Best Practices

  • Schedule regular backups of your configurations
  • Use descriptive filenames that include dates
  • Store backups in multiple locations
  • Test your backups by restoring them in a lab environment
  • Document your backup procedures

Having good backups can save you hours of reconfiguration time if something goes wrong with your network devices.