How to Back Up a Cisco Switch Configuration: 8 Steps
How-to guide

How to Back Up a Cisco Switch Configuration: 8 Steps

Eight steps any network administrator can follow today to keep a safe, dated copy of every Cisco switch configuration.

25+ yearsIT & cybersecurity experience
Certified expertsCISSP · C|CISO · Microsoft · Cisco
Southern CaliforniaLocal and on-site, based in Irvine
NationwideRemote audits & advisory
Schedule a consultation
Page 11 of 11 in the Cisco Network Security Audit series · Start at page 1

Before you start

A configuration backup is a text file, but it is a sensitive one: it can contain password hashes, reversible type 7 passwords, SNMP communities and VPN keys. Store backups like you store passwords, never in a shared folder or email. The commands below are for IOS and IOS XE unless noted; test them on one switch first and follow your change process.

Network administrators following steps to back up a Cisco switch configuration

Eight steps

Step 1

Save the running configuration

Make sure the switch will boot with what it runs now.

Example commands
copy running-config startup-config
! or the short form
write memory
Step 2

Capture it to your terminal

Turn off paging and print the whole configuration, with session logging on in your SSH client.

Example commands
terminal length 0
show running-config
Step 3

Copy it off the switch with SCP

Prefer SCP over TFTP, which has no authentication or encryption.

Example commands
copy running-config scp://backup@10.20.0.50/configs/acc-01.cfg
Step 4

Turn on automatic archiving

IOS and IOS XE can copy the configuration on every save and once a day.

Example commands
archive
 path scp://backup@10.20.0.50/configs/$h-$t
 write-memory
 time-period 1440
Step 5

Check the archive

Confirm that archives are being written.

Example commands
show archive
Step 6

Compare before you trust it

See what differs between the saved and running configuration.

Example commands
show archive config differences nvram:startup-config system:running-config
Step 7

Back up other platforms

Nexus, ASA and AireOS controllers use their own commands.

Example commands
! NX-OS
copy running-config scp://backup@10.20.0.50/configs/nx-01.cfg vrf management
! AireOS wireless controller
transfer upload datatype config
transfer upload start
Step 8

Store and test the backups

Keep them encrypted, keep several versions, and restore one to a lab switch twice a year.

Example commands
! keep: dated files, access limited to network admins,
! a copy off-site, and a tested restore procedure
ASA note: show running-config on an ASA masks some secrets; more system:running-config shows them in full. Treat that output as a secret.

Or let the audit do it for every device

The Cisco Network Security Audit backs up every router, switch, firewall and controller in one read-only session, flags unsaved changes, and gives you a redacted copy you can share, along with a network diagram and 69 security checks.

Want every device backed up and reviewed?

One read-only audit, every configuration saved, 69 checks scored. $3,500 fixed.

Read-only audit. No changes to your devices. Irvine, Orange County and Southern California on-site; remote nationwide.