Backup and Restore Cisco IOS (Switches and Routers)

KB ID 0000538 

Problem

It’s been a long time since I ran through setting up a TFTP server, but I still use 3CDeamon. Below I’ll run though the simple commands to back up, and restore the devices configuration.

Solution

Backing up a Cisco IOS Device

1. First you have to setup a TFTP server, and know the IP address of the machine it’s on!

2. Connect to the device, either via console cable, Telnet or SSH.

3. Log in > Go to enable mode > issue a “copy running-config tftp”* command > Supply the IP address of the TFTP server > Give the backup file a name.

Note: You can also use startup-config to copy the config saved in NVRAM rather than the running-config.

[box]

User Access Verification

Username: username
Password:*******

PeteRouter#enable
PeteRouter#copy running-config tftp
Address or name of remote host []? 10.10.0.1
Destination filename [PeteRouter-confg]? PeteRouter_Backup
!!
7400 bytes copied in 0.548 secs (13504 bytes/sec)

PeteRouter#

[/box] 4. If you keep an eye on the TFTP server you can see the file coming in.

Restoring a Cisco Cisco IOS Device

1. As above have your TFTP server up and running with the file you want to restore in its root directory.

2. Connect to the device either via console cable, Telnet or SSH.

3. Log in > Go to enable mode > issue a “copy tftp running-config”* command > Supply the IP address of the TFTP server > Give the backup file a name.

Note: You can also use startup-config to restore the config saved in NVRAM rather than the running-config.

[box]

User Access Verification

Username: username
Password: *******

PeteRouter#enable
PeteRouter#copy tftp running-config
Address or name of remote host []? 10.10.0.1
Source filename []? PeteRouter_Backup
Destination filename [running-config]? {Enter}
Accessing tftp://10.10.0.1/PeteRouter_Backup...
Loading PeteRouter_Backup from 10.10.0.1 (via GigabitEthernet0/0): !
[OK - 7400 bytes]

7400 bytes copied in 0.440 secs (16818 bytes/sec)

PeteRouter#

[/box]

4. Remember you have restored the running-config you would need to issue a “copy run start” command to make this config persistent (i.e. after a restart or reload of the router). If you issued a “copy tftp startup-config”, you would need to reboot for the restored config to be loaded into memory.

Related Articles, References, Credits, or External Links

Install and Use a TFTP Server

Backup and Restore a Cisco Firewall