copy

Copies configuration data.

Syntax

copy source_file destination_file [ remove-tpvm ]

Parameters

source_file
The source file to be copied. Specify one of the following parameters:
default-config
The default configuration.
running-config
The running configuration.
startup-config
The startup configuration.
flash:// filename
A file in the local flash memory.
ftp:// username:password@host_ip_address/path
A file on a remote host. Transfer protocol is FTP.
scp:// username:password@host_ip_address/path
A file on a remote host. Transfer protocol is SCP.
sftp:// username:password@host_ip_address/path
A file on a remote host. Transfer protocol is SFTP.
tftp:// username:password@host_ip_address/path
A file on a remote host. Transfer protocol is TFTP.
usb:// path
A file on an attached USB device.
destination_file
The destination file. Specify one of the following parameters:
default-config
The default configuration.
running-config
The running configuration.
startup-config
The startup configuration.
flash:// filename
A file in the local flash memory.
ftp:// username:password@host_ip_address//path
A file on a remote host. Transfer protocol is FTP.
scp:// username:password@host_ip_address//path
A file on a remote host. Transfer protocol is SCP.
sftp:// username:password@host_ip_address/path
A file on a remote host. Transfer protocol is SFTP.
tftp:// username:password@host_ip_address/path
A file on a remote host. Transfer protocol is TFTP.
usb:// path
A file on an attached USB device.
remove-tpvm
By default, TPVM configuration is persisted and the TPVM is reinstalled and reconfigured when the copy default-config startup-config is executed. When the copy default-config startup-command command is executed with this parameter, any installed TPVM is also removed and the device reboots with a clean install without TPVM.

Modes

Privileged EXEC mode

Usage Guidelines

Use this command to back up and restore configuration files with various protocols.

This command is supported only on the local switch.

IPv4 and IPv6 addresses are supported.

The special characters of dollar sign "$" and exclamation point "!" can be used as part of the password variable, provided they are paired with the correct escape characters. The "$" must be paired with two backslashes "\\". For example, if your password choice was "$password" on a remote server, you must use "username:\\$password@1.1.1.1" for the copy command. The exclamation point must be paired with a single backslash in the copy command, such as "username:\!password@1.1.1.1".

When using a file to restore a backed up configuration as the startup configuration, care must be taken to ensure that the source file's TPVM configuration is the same as the running TPVM's configuration. Particularly, if the source's TPVM configuration is partial, and does not have some of the configured parameters of the running TPVM instance. In such a scenario, it is advised not to proceed with this change as it will result in the configuration of the installed TPVM not being similar to the configuration of the previous TPVM instance.

On SLX 9740 and Extreme 8720 devices, you cannot access a remote FTP server with its IPv6 address. Instead, use the remote FTP server's IPv4 address.

Examples

To save the running configuration to a file:

device# copy running-config flash://myconfig 
                

To overwrite the startup configuration with a locally saved configuration file:

device# copy flash://myconfig running-config
                

To overwrite the startup configuration with a remotely archived configuration file:

device# copy scp://user:password@10.10.10.10//myconfig startup-config 
                

To overwrite the startup configuration with a configuration file saved on an attached USB device:

device# copy usb://myconfig startup-config
                

To overwrite the startup configuration with the default configuration. This will wipe out the device's configuration but will reinstall and reconfigure the TPVM installation on the device.

device# copy default-config startup-config
                

To overwrite the startup configuration with the default configuration. This will wipe out the device's configuration including the TPVM installed on the device.

device# copy default-config startup-config remove-tpvm