Copying Files
To copy a file from a source to a destination, use the
copy source-url destination-url
privileged EXEC
command. For the source and destination URLs, you can use
running-config
and
startup-config
keyword
shortcuts. For example, the
copy running-config startup-config
command saves the currently running
configuration file to the NVRAM section of flash memory to be used as the configuration during system
initialization.
You can also copy from special file systems (
xmodem:
,
ymodem:
) as the source for the file from a network
machine that uses the Xmodem or Ymodem protocol.
Network file system URLs include ftp:, rcp:, tftp:, scp:, http:, and https: and have these syntaxes:
• FTP—ftp:[[//username [:password]@location]/directory]/filename
• RCP—rcp:[[//username@location]/directory]/filename
• TFTP—tftp:[[//location]/directory]/filename
• SCP—scp:[[//username [:password]@location]/directory]/filename
• HTTP—http:[[//username [:password]@location]/directory]/filename
• HTTPS—https:[[//username [:password]@location]/directory]/filename
The password must not contain the special character '@'. If the character '@' is used, the copy fails to parse
the IP address of the server.
Note
Local writable file systems include flash:.
Some invalid combinations of source and destination exist. Specifically, you cannot copy these combinations:
• From a running configuration to a running configuration
• From a startup configuration to a startup configuration
• From a device to the same device (for example, the
copy flash: flash:
command is invalid)
Copying Files from One Device in a Stack to Another Device in the Same Stack
To copy a file from one device in a stack to another device in the same stack, use the
flash-X:
notation, where
X
is the device number.
To view all devicees in a stack, use the
show switch
command in privileged EXEC mode, as in the following
example of a 9-member device stack:
Device#
show switch
Switch/Stack Mac Address : 0006.f6b9.b580 - Local Mac Address Mac persistency wait time:
Indefinite
H/W
Current
Switch#
Role
Mac Address
Priority Version
State
------------------------------------------------------------
*1
Active
0006.f6b9.b580
15
P3B
Ready
System Management Configuration Guide, Cisco IOS XE Fuji 16.8.x (Catalyst 9500 Switches)
245
Working with the Flash File System
Copying Files