Lessons · Network switches · backing it up
Keep a copy where the switch is not
The startup configuration is a copy on the same box; a real backup is the text of the running configuration kept somewhere else.
Hone is a place to practise programming. This is one of its lessons, written out in full and free to read without an account.
What it is for
A saved configuration does not help when the switch itself has died. Rebuilding a replacement from a text file takes ten minutes; rebuilding it from memory takes a day and gets details wrong.
How to think about it
Save on the box, then copy the text off it. `show running-config` is plain text: select it, paste it into a file, name the file after the switch and the date.
Worked example
enableThe # prompt.
configure terminalInto configuration mode.
hostname IDF2Something worth keeping.
endOut.
write memorySaved on the box, which protects against a reboot and nothing else.
show running-configThe text to copy off. This is the backup; the rest is filing.
show startup-configWhat the box will come back as. Reading both, and seeing them match, is the check that they are in step.
Your turn
Print what the switch will boot as, to check it matches what it is running.
show
Console into a switch
The trap
Treating `write memory` as a backup. It writes to the same box that just caught fire. A backup is off the device or it is not a backup.