Hands-On Lab: Backing Up and Restoring Router Configuration Files

This hands-on lab backs up a router's running configuration to a TFTP server, deliberately makes an unwanted configuration change, and restores the router to its previous known-good state from the backup.

TFTP Configuration BackupConfiguration RestoreDisaster Recovery

~3 min read · Updated Sep 23, 2026

Lab Objective

Back up a router's current configuration to a TFTP server, make a deliberate unwanted change to the configuration, then restore the router to its previously backed-up state and verify the unwanted change is gone.

Lab Purpose

A configuration backup taken before a risky change is standard practice before any significant maintenance activity, providing a fast, reliable way to revert if something goes wrong rather than manually reconstructing a configuration from memory or scattered notes.

Lab Topology

R1 ---- Gi0/0: 192.168.85.1/24

TFTP server: 192.168.85.100/24

Task 1: Configure Basic Addressing

Configure R1's interface connecting to the TFTP server's segment.

Task 2: Back Up the Current Configuration

Copy R1's running configuration to the TFTP server.

Task 3: Make an Unwanted Configuration Change

Deliberately change R1's hostname and remove a loopback interface, simulating an unintended or mistaken configuration change.

Task 4: Verify the Unwanted State

Confirm the hostname has changed and the loopback interface is gone.

Task 5: Restore from the Backup

Copy the backed-up configuration from the TFTP server back onto R1.

Task 6: Verify the Restoration

Confirm the hostname and loopback interface match the original backed-up state.

Solution and Verification

R1(config)# interface gigabitethernet0/0
R1(config-if)# ip address 192.168.85.1 255.255.255.0
R1(config-if)# no shutdown
R1(config-if)# exit
R1(config)# interface loopback0
R1(config-if)# ip address 10.99.1.1 255.255.255.255
R1(config-if)# exit
R1(config)# end

R1# copy running-config tftp:

Address or name of remote host []? 192.168.85.100
Destination filename [r1-confg]? R1-backup.txt

Writing R1-backup.txt !!
1284 bytes copied in 1.294 secs

R1(config)# hostname R1-BROKEN
R1-BROKEN(config)# no interface loopback0
R1-BROKEN(config)# end

R1-BROKEN# show ip interface brief | include Loopback
-- (no output -- loopback0 is gone)

R1-BROKEN# show running-config | include hostname
hostname R1-BROKEN

R1-BROKEN# copy tftp: running-config

Address or name of remote host []? 192.168.85.100
Source filename []? R1-backup.txt
Destination filename [running-config]?

Accessing tftp://192.168.85.100/R1-backup.txt...
Loading R1-backup.txt from 192.168.85.100
1284 bytes copied in 1.156 secs

R1# show running-config | include hostname
hostname R1
-- Hostname restored

R1# show ip interface brief | include Loopback
Loopback0    10.99.1.1    YES manual up    up
-- Loopback interface restored

Key Takeaway

Restoring from a backup with copy tftp: running-config merges the backup into the currently running configuration rather than fully replacing it — any configuration added after the backup was taken but not present in the backed-up file may still remain, so verifying the final state after a restore, as done here, is essential rather than assuming a restore perfectly recreates the exact backed-up state.

Written & researched by Dr. Shahin Siami

Related Articles

Hands-On Lab: Configuring UDLD

This hands-on lab configures UDLD in aggressive mode on a fiber link between two switches, simulating a unidirectional fiber failure and verifying UDLD detects the mismatch and shuts down the affected port before a Layer 2 loop can form.

Continue

Hands-On Lab: Configuring Loop Guard

This hands-on lab configures Loop Guard on a switch's non-designated ports to prevent a unidirectional link failure from causing a Layer 2 loop, simulating a one-way BPDU loss and verifying the affected port enters a loop-inconsistent blocking state rather than incorrectly transitioning to forwarding.

Continue

Hands-On Lab: Configuring BPDU Guard and BPDU Filter

This hands-on lab configures BPDU Guard globally for PortFast-enabled ports and demonstrates the distinct, riskier behavior of BPDU Filter, comparing how each responds when a switch is connected to an access port that should only ever see end-user devices.

Continue

Hands-On Lab: Configuring Root Guard

This hands-on lab configures Root Guard on switch ports facing access-layer switches to prevent an unauthorized or misconfigured switch from becoming the Spanning Tree root, verifying the port enters a root-inconsistent state when a superior BPDU is received.

Continue

Hands-On Lab: Comprehensive Troubleshooting Challenge

This hands-on lab presents a multi-layer connectivity failure across VLANs, trunking, routing, and NAT simultaneously, requiring systematic bottom-up troubleshooting to identify and correct three independent faults before full connectivity is restored.

Continue

Hands-On Lab: Configuring Enhanced Object Tracking with HSRP

This hands-on lab configures IP SLA-based object tracking on an HSRP-enabled router, automatically lowering its priority when its WAN uplink fails, forcing failover to the standby router without requiring a full interface shutdown.

Continue
Hands-On Lab: Backing Up and Restoring Router Configuration Files | Dr. Shahin Siami