Hone

Lessons · Network switches · backing up to a server

A copy of the configuration that is not on the switch

`copy running-config tftp://<server>/<name>` sends the live configuration to a server as a text file. Source first, destination second, always.

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

write memory writes to the same box that just died. A configuration on a server is what turns replacing a switch into ten minutes of pasting.

How to think about it

Save on the box, copy off the box, name the file after the switch and the date. Then read it back once, so you find out today that the backup works rather than on the day you need it.

Worked example

enable
The # prompt.
configure terminal
Something worth keeping.
hostname WARD3
Named.
end
Out.
write memory
On the box, which protects against a reboot and nothing else.
copy running-config tftp://10.31.6.2/ward3.cfg
Off the box. This is the backup; everything before it was housekeeping.
show running-config
The same text that was just sent. A configuration is plain text, which is why a rebuild is a paste rather than a project.

Your turn

Send the live configuration to the server as ward3.cfg.

 running-config tftp://10.31.6.2/ward3.cfg

The trap

Getting the two arguments the wrong way round. `copy tftp://... running-config` pulls the file ONTO the switch and merges it into what is running, which on a live box is a very different afternoon.

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