Command:

copy (CLI)


Mode:

Switch> (enable)


Syntax:

copy file-id {config | flash | rcp | tftp}

copy config {file-id | flash | rcp| tftp} [all]

copy tftp {file-id | flash | config}

copy rcp {file-id | flash | config}

copy flash {file-id | tftp | rcp | config}


Syntax Description:

file-id

Variable that specifies the file on which to perform the copy action, where file-id is in the format [[m/]device:][filename].

m/ = The module where the Flash device is located (such as the standby supervisor engine, an FDDI module, or an ATM module). Module 1 is assumed if a different module is not specified.

device: = Device where the file is located. Valid Flash devices are bootflash:, slot0:, and slot1:. You can also specify tftp: as the device name. The colon (:) is required after the device name.

filename = Name of the system image or configuration file.

config

Keyword that copies the switch configuration file to the specified file, or that the specified file will be used to configure the switch.

flash

Keyword that copies the file to or from the Flash file system

rcp

Keyword that copies the file to or from an rcp server

tftp

Keyword that copies the file to or from a TFTP server

all

(Optional) Keyword that copies the entire configuration to the specified destination configuration file. If you do not use the all keyword, only nondefault commands are copied to the destination configuration file.

 


Command Description:

 

Use the copy command set to upload or download a Flash image or a switch configuration to or from a Flash device, rcp server, or TFTP server.

The Catalyst 4000 family switches support only the bootflash: Flash device.

If you use the flash keyword as the copy source or destination, you are prompted for the Flash device name. If you are copying a software image to multiple intelligent switching modules of the same type, use the flash keyword as the copy destination. The switch automatically determines which modules to copy the image to based on the header in the source image file. If you want to copy a software image to a single intelligent switching module in a switch with multiple modules of the same type, you must specify the destination file-id as m/bootflash: (do not specify a filename).


Examples:

This example shows how to upload the non-default switch configuration to a file named cat.cfg on the slot0: Flash device:

Console> (enable) copy config slot0:cat.cfg
 
Upload configuration to slot0:cat.cfg
649324 bytes available on device slot0, proceed (y/n) [n]? y
 
.........
/
Configuration has been copied successfully. (10200 bytes)
Console> (enable)
 

This example shows how to upload both the default and non-default switch configuration to a file named lab2.cfg on a TFTP server:

 

Console> (enable) copy config tftp:lab2.cfg all
 
IP address or name of remote host [172.20.22.7]? y
 
Upload configuration to imgFile:lab2.cfg (y/n) [n]? y
 
.........
/
Configuration has been copied successfully. (10299 bytes).
Console> (enable)
 

This example shows how to upload the non-default switch configuration to the cat.cfg file on the slot1: Flash device:

Console> (enable) copy config flash
 
Flash device [bootflash]? slot1:
 
Name of file to copy to [configFile]? cat.cfg
 
Upload configuration to slot1:cat.cfg
749124 bytes available on device slot1, proceed (y/n) [n]? y
 
.........
/
Configuration has been copied successfully. (200345 bytes).
Console> (enable)
 

This example shows how to upload an image from a remote host into Flash using rcp:

Console> (enable) copy rcp flash
 
IP address or name of remote host []? 172.20.52.3
 
Name of file to copy from []? cat5000-sup3.4-2-1.bin
 
Flash device [bootflash]?
Name of file to copy to [cat5000-sup3.4-2-1.bin]?
 
4369664 bytes available on device bootflash, proceed (y/n) [n]? y
 
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
File has been copied successfully.
Console> (enable)
 

This example shows how to upload the running configuration on a Catalyst 4000 family, Catalyst 2948G, or Catalyst 2980G switch to an rcp server for storage:

Console> (enable) copy config rcp
 
IP address or name of remote host []? 172.20.52.3
 
Name of file to copy to []? cat5000_config.cfg
 
 
Upload configuration to rcp:cat5000_config.cfg, (y/n) [n]? y
 
.....
/
Configuration has been copied successfully.
Console> (enable)
 

This example shows how to configure a switch using a configuration file downloaded from an rcp server:

Console> (enable) copy rcp config
 
IP address or name of remote host []? 172.20.52.3
 
Name of file to copy from []? dns-config.cfg
 
 
Configure using rcp:dns-config.cfg (y/n) [n]? y
 
/
Finished network download.  (134 bytes)
>>
>> set ip dns server 172.16.10.70 primary
172.16.10.70 added to DNS server table as primary server.
>> set ip dns server 172.16.10.140
172.16.10.140 added to DNS server table as backup server.
>> set ip dns enable
DNS is enabled
>> set ip dns domain corp.com
Default DNS domain name set to corp.com
Console> (enable)
 

This example shows how to configure the switch using a configuration file on a Flash device:

Console> (enable) copy flash config
 
Flash device [bootflash]?
Name of configuration file? test.cfg
 
Configure using bootflash:test.cfg (y/n) [n]? y
 
/
Finished download. (10900 bytes)
>> set password $1$FMFQ$HfZR5DUszVHIRhrz4h6V70
Password changed.
>> set enablepass $1$FMFQ$HfZR5DUszVHIRhrz4h6V70
Password changed.
>> set prompt Console>
>> set length 24 default
Screen length set to 24.
>> set logout 20
.....
Console> (enable)

This example shows how to copy a file from a TFTP server to a Flash device:

Console> (enable) copy tftp bootflash:
 
Address or name of remote host [172.20.22.7]?
Enter source file name [cat4000-sup.4-5-1.bin]?
Enter destination file name [cat4000-sup.4-5-1.bin]?
6942528 bytes available in flash, proceed (y/n) [n]?y
 
Console> (enable)

Misconceptions:

 

None


Related Commands:

 

None

 


� Cisco Systems, Inc. 2001, 2002, 2003
World Wide Education

Converted from CHM to HTML with chm2web Pro 2.85 (unicode)