Lessons · Network switches · copy FROM TO, source first
copy FROM TO, with no exceptions
Every copy command on a switch is source first, destination second. Four commands you will use constantly are the same rule read left to right.
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 you overwrite either your only backup or the switch you came to fix.
How to think about it
Say the line out loud as a sentence: copy this, onto that. If the sentence is wrong, the command is.
Worked example
enableIn.
configure terminalConfiguring.
hostname CLOSET-3Something to save.
endDone.
copy running-config startup-configLive, onto the one that boots. This saves.
copy running-config tftp://10.0.0.9/closet3.cfgLive, onto a server. This backs up.
copy startup-config running-configSaved, onto live. The same two files the other way, and it LOADS.
show running-config | include hostnameStill CLOSET-3, because that is what both files said.
Your turn
Save the configuration that is running right now.
running-config startup-config
Console into a switch
The trap
Reading the two arguments as a pair of names rather than as a direction. They are never interchangeable and both orders run.