How to Back Up Switch and Firewall Configs by Hand
A switch or firewall that is replaced or misconfigured is far easier to fix when you have a recent copy of its configuration. This guide covers what to save, where to put it, how to see what changed and how to restore with care. It then shows where the manual process starts to cost real time.
Know which configuration you are saving
On Cisco IOS XE devices, Cisco's documentation separates the running configuration from the startup configuration. The running configuration is held in RAM and reflects the current settings. The startup configuration is stored in NVRAM and used when the device boots. Changes you make take effect at once in the running configuration, but they survive a reboot only if you save them to the startup configuration.
That difference matters for backups. A copy of the startup configuration may be missing recent changes, and a copy of the running configuration may include changes nobody saved. Decide which one your backup records, and write it down. Other brands name these things differently, so read your vendor's guide for your software release.
Copy the configuration off the device
A backup that lives only on the device it protects is lost with the device. Cisco's documentation describes copying configuration files to and from servers over TFTP, FTP and rcp, and notes that FTP and rcp are generally faster and more reliable than TFTP because they run over TCP.
For Fortinet FortiGate firewalls, the FortiOS administration guide has a page on backing up the configuration. Follow the page that matches your firmware version, because menus and commands differ between releases. For HP and Aruba switches, use the management and configuration guide for your exact software release.
- Use a file server you control, not a laptop that will be reimaged.
- Name each file with the device name and the date.
- Keep every version rather than overwriting the last one, so you can go back to a date.
Protect the backups
Device configurations can contain password hashes and other secrets. Treat the backup folder like any sensitive file: limit who can read it, include it in your own backups, and do not email copies around.
If you share a configuration with a vendor or a consultant, check first what the file contains. Fortinet's documentation discusses masking passwords in a backup for this purpose, so look for it in the page for your firmware.
Decide how long to keep old versions and write it down. Keeping every version costs very little disk space, because configurations are small text files, and it lets you answer questions about changes months later. Review who has access to the backup folder whenever someone joins or leaves your team.
Compare two versions to see what changed
Open two saved files in a text comparison tool and read the differences section by section. Added and removed lines tell you what someone changed. Expect some lines to differ even when nobody changed anything, such as timestamps and counters that the device writes into the file. Learn which lines those are on your devices and ignore them.
To find who made a change, look at what the device records. Depending on the brand and settings, a device may log the user or session that made a change. If it does not, the file alone cannot tell you, so pair the comparison with your change tickets.
Make comparing part of every change window. Save a copy before the change, save another after it, and read the difference. If the difference contains lines you did not intend to touch, you have found the problem while the change window is still open, and not three weeks later when a user reports it.
Restore with care
Cisco's documentation warns that loading a configuration file from a server into the running configuration merges its commands with the existing ones. The router does not erase the existing running configuration first. If you need an exact copy of a saved file, the documentation says to copy it directly to the startup configuration and reload.
Before any restore, make sure you have console access in case the device becomes unreachable, copy the current configuration so you can undo the restore, and schedule the work outside business hours. If you can, rehearse on a spare device first.
- Back up the current state before you restore.
- Confirm console or out-of-band access.
- Restore during a change window and test afterward.
Where SwitchKeep fits
SwitchKeep is coming soon, and it will launch as a beta. It is built to automate this routine: log in to your devices every night, save the configuration, keep every version, show the differences and alert you on a change. It only reads from devices, and a restore is text you paste yourself. We have not set a date; join the list and we email you at launch.
Sources
- Cisco: Managing Configuration Files (System Management Configuration Guide, IOS XE 17.x)
- Fortinet: Backing up the configuration (FortiOS 7.6.7 Administration Guide)
- Fortinet: Configuration backups (FortiOS 7.2.1 Administration Guide)
Coming soon: SwitchKeep
Nightly backups of switch, router and firewall configs, with diffs. SwitchKeep logs in to your switches, routers and firewalls every night, saves the configuration and shows what changed since last time. It can also prepare an old config as text for you to paste back. It is for IT admins and small MSPs who want a simple config backup. It is in beta: every brand is marked beta until a backup from a real device of that brand has been checked.
Get SwitchKeep first
Join the list and get 25% off your first purchase when it goes on sale. We email you a discount code on launch day. One code per person, for new customers.
One email when it launches (plus the discount code). No other mail, and you can say stop at any time. See our privacy policy.