Lessons · Network switches · copy, source first
copy FROM TO, and there are no exceptions
Every `copy` on a switch reads the first argument and writes the second. Source first, destination second, everywhere in IOS.
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
Both directions are valid commands, so nothing stops you getting it backwards -- and backwards is either your only backup overwritten, or a file pushed onto a live switch on top of what is running.
How to think about it
Read it left to right, out loud if it helps. running-config to startup-config saves. tftp to running-config restores. The rule is the whole trick.
Worked example
enableIn.
configure terminalSomething to save.
hostname IDF3Named.
endOut.
copy running-config startup-configFrom the live one, to the one that boots. This saves.
copy running-config tftp://10.0.0.9/idf3.cfgFrom the live one, to a server. This backs up.
copy startup-config running-configThe other way round: from the saved one, ONTO the live one. This loads.
Your turn
Save the live configuration so it survives a power cut.
copy running-config
Console into a switch
The trap
There is no confirmation that asks whether you meant it. The command is valid in both directions and runs either way.