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 13 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.

Common problems and how to fix them

Most backup failures come from a handful of causes. Check these before assuming the switch is at fault.

ProblemLikely cause and fix
The SCP copy failsThe account on the backup server cannot write to the folder, or SCP is not enabled on the server. Test the same login from a computer with an SCP client first.
The archive writes nothingThe switch cannot reach the backup server from the interface it uses. Check show archive, then ping the server from the switch.
A restored configuration misbehavesIt was restored onto a different software version or model. Record the version with every backup and restore to matching hardware where possible.
Passwords are readable in the backupType 7 passwords are reversible. Replace them with type 9 secrets, and keep full backups encrypted.
An old switch only supports TFTPUse TFTP only on an isolated management network, move the file to secure storage immediately, and plan to replace the switch.

Questions about switch backups

How often should switch configurations be backed up?

After every change and on a schedule, at least daily for core devices. The archive command in step 4 does both.

Do I need a tool to back up many switches?

For a handful of switches the archive command is enough. For dozens, an automation tool such as Oxidized or your managed service provider’s platform collects and compares configurations centrally.

Is a backup the same as a security review?

No. A backup preserves the configuration; a review checks whether that configuration is secure. The Cisco Network Security Audit does both in one read-only session.

Cisco network security audit sample: Executive Security Report cover (fictional company, illustrative data)Cisco network security audit sample: Assessment dashboard summary (fictional company, illustrative data)Cisco network security audit sample: Follow-up comparison progress page (fictional company, illustrative data)

Cisco network audit sample report

See every page of the reports you would receive

Executive and technical reports, risk register, roadmap, Excel workbook, dashboard, topology and a follow-up comparison, from a fictional company.

View the sample report

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.