Hone

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

enable
The # prompt.
configure terminal
Into configuration mode.
hostname IDF2
Something worth keeping.
end
Out.
write memory
Saved on the box, which protects against a reboot and nothing else.
show running-config
The text to copy off. This is the backup; the rest is filing.
show startup-config
What 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 

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.

Practise backing it up on HoneA question on it now, a coding challenge where there is one, and it is remembered for review. Free, no email needed.