copy

The copy command uploads and downloads files to and from the switch. You can also use the copy command to manage the dual images (active and backup) on the file system. Upload and download files from a server using FTP, TFTP, Xmodem, Ymodem, or Zmodem. SFTP and SCP are available as additional transfer methods if the software package supports secure management. If FTP is used, a password is required.

Format copy source destination {verify | noverify}
Mode Privileged EXEC

Replace the source and destination parameters with the options in Copy Parameters. For the URL source or destination, use one of the following values:

{xmodem | tftp://ipaddr|hostname | ip6address|hostname/filepath/filename [noval]| sftp|scp://username@ipaddr | ipv6address/filepath/filename | ftp://user@ipaddress | hostname/filepath/filename}

verify | noverify is only available if the image/configuration verify options feature is enabled (see file verify). verify specifies that digital signature verification will be performed for the specified downloaded image or configuration file. noverify specifies that no verification will be performed.

The keyword ias-users supports the downloading of the IAS user database file. When the IAS users file is downloaded, the switch IAS user‘s database is replaced with the users and its attributes available in the downloaded file. In the command copy url ias-users, for url one of the following is used for IAS users file:

  • tftp:// {ipaddr | hostname} | {ipv6address | hostname/filepath/filename}
  • sftp | scp://username@ipaddress/filepath/filename
Note

Note

The maximum length for the file path is 160 characters, and the maximum length for the file name is 31 characters.

For FTP, TFTP, SFTP and SCP, the ipaddr|hostname parameter is the IP address or host name of the server, filepath is the path to the file, and filename is the name of the file you want to upload or download. For SFTP and SCP, the username parameter is the username for logging into the remote server via SSH.

Note

Note

ip6address is also a valid parameter for routing packages that support IPv6.

For platforms that include stacking, use the optional [unit unit id] parameter (when available) to specify the stack member to use as the source for the item to copy. If no unit is specified, the item is copied from the stack master.

To copy OpenFlow SSL certificates to the switch using TFTP or XMODEM, using only the following options pertinent to the OpenFlow SSL certificates.

Format copy {mode | file} nvram:{openflow-ssl-ca-cert | openflow-ssl-cert | openflow-ssl-priv-key}
Mode Privileged EXEC
Caution

Caution

Remember to upload the existing fastpath.cfg file off the switch prior to loading a new release image in order to make a backup.
Click to expand in new window

Copy Parameters

Source Destination Description
nvram:application: sourcefilename url Filename of source application file.
nvram:backup-config nvram:startup-config Copies the backup configuration to the startup configuration.
nvram:clibanner url Copies the CLI banner to a server.
nvram: core-dump [unit unit id] One of the following:

tftp://ipaddress | hostname/filepath/filename

ftp://ipaddress | hostname/filepath/filename

scp://ipaddress | hostname/filepath/filename

sftp://ipaddress | hostname/filepath/filename

Uploads the core dump file on the local system to an external TFTP/FTP/SCP/SFTP server.
nvram:cpupktcapture.pcap [unit unit id] url Uploads CPU packets capture file.
nvram:crash-log url Copies the crash log to a server.
nvram:errorlog url Copies the error log file to a server.
nvram:factory-defaults url Uploads factory defaults file.
nvram:fastpath.cfg url Uploads the binary config file to a server.
nvram:log url Copies the log file to a server.
nvram:operational-log [unit unit id] url Copies the operational log file to a server.
nvram:script scriptname url Copies a specified configuration script file to a server.
nvram:startup-config nvram:backup-config Copies the startup configuration to the backup configuration.
nvram:startup-config url Copies the startup configuration to a server.
nvram:startup-log [unit unit id] url Uploads the startup log file.
nvram: tech-support [unit unit id] url Uploads the system and configuration information for technical support.
nvram:traplog url Copies the trap log file to a server.
system:running-config nvram:startup-config Saves the running configuration to NVRAM.
system:running-config nvram:factory-defaults Saves the running configuration to NVRAM to the factory-defaults file.
system:image url Saves the system image to a server.
tftp:// ipaddress/filename system:packet.pcap Copies a PCAP file into RAM. The PCAP file is used to inject packets into the silicon for tracing the packets.
url nvram:application destfilename Destination file name for the application file.
url nvram:ca-root index Downloads the CA certificate file to the /mnt/fastpath directory and uses the index number name the downloaded file to CAindex.pem.
url nvram:clibanner Downloads the CLI banner to the system.
url nvram:client-key index Downloads the client key file to the /mnt/fastpath directory and uses the index number name the downloaded file to CAindex.key.
url nvram:client-ssl-cert 1-8 Downloads the client certificate to the /mnt/fastpath directory and uses the index number to name the downloaded file to CAindex.pem.
url nvram:fastpath.cfg Downloads the binary config file to the system.
url nvram:publickey-config Downloads the Public Key for Configuration Script validation.
url nvram:publickey-image Downloads Public Key for Image validation.
url nvram:script destfilename Downloads a configuration script file to the system. During the download of a configuration script, the copy command validates the script. In case of any error, the command lists all the lines at the end of the validation process and prompts you to confirm before copying the script file.
url nvram:script destfilename noval When you use this option, the copy command will not validate the downloaded script file. An example of this command follows:
(Extreme 220) (Routing) #copy tftp://1.1.1.1/file.scr nvram:script file.scr noval
url nvram:sshkey-dsa Downloads an SSH key file. For more information, see Secure Shell Commands.
url nvram:sshkey-rsa1 Downloads an SSH key file.
url nvram:sshkey-rsa2 Downloads an SSH key file.
url nvram:sslpem-dhweak Downloads an HTTP secure-server certificate.
url nvram:sslpem-dhstrong Downloads an HTTP secure-server certificate.
url nvram:sslpem-root Downloads an HTTP secure-server certificate. For more information, see Hypertext Transfer Protocol Commands.
url nvram:sslpem-server Downloads an HTTP secure-server certificate.
url nvram:startup-config Downloads the startup configuration file to the system.
url ias-users Downloads an IAS users database file to the system. When the IAS users file is downloaded, the switch IAS user‘s database is replaced with the users and their attributes available in the downloaded file.
url nvram:tech-support-cmds Downloads the file containing list of commands to be displayed using the show tech-support command.
url {active | backup} Download an image from the remote server to either image. In a stacking environment, the downloaded image is distributed to the stack nodes.
{active | backup} url Upload either image to the remote server.
active backup Copy the active image to the backup image.
backup active Copy the backup image to the active image.
{active | backup} unit://unit/{active | backup} Copy an image from the management node to a given node in a stack. Use the unit parameter to specify the node to which the image should be copied.
{active | backup} unit://*/{active | backup} Copy an image from the management node to all of the nodes in a stack.

The following shows an example of downloading and applying ias users file.

(Extreme 220) (Routing) #copy tftp://10.131.17.104/aaa_users.txt ias-users
Mode........................................... TFTP
Set Server IP.................................. 10.131.17.104
Path........................................... ./
Filename....................................... aaa_users.txt
Data Type...................................... IAS Users
Management access will be blocked for the duration of the transfer
Are you sure you want to start? (y/n) y
File transfer operation completed successfully.
Validating and updating the users to the IAS users database.
Updated IAS users database successfully.
(Extreme 220) (Routing) #