copy FILE

Copies contents of a configuration file from the specified location to the running configuration.

Syntax

copy FLASH-FILE running-config
copy REMOTE-FILE running config
copy USB-FILE running-config

Parameters

running-config
Specifies the current running configuration.
FLASH-FILE
Specifies the flash file path in format flash://flash-type/file-name.
REMOTE-FILE
Specifies the remote server file path in format scp://username:password@host[:port]/filepath.
Domain name, IPv4 address, and IPv6 address are supported as host. Only valid unicast IP addresses are supported, multicast IP addresses are not supported.
USB-FILE
Specifies the USB file path in format usb://file-name.

Modes

Exec mode

Usage Guidelines

This command is available only to users with admin role.

Valid user credentials must be provided for accessing the remote server.

Input config file path must be valid.

Examples

The following examples are some valid copy commands.

device# copy flash://config-file/testfile running-config 

device# scp://test:test@1.1.1.1:22/home/test/config-file/testfile running-config

device# copy usb://testfile running-config
The following examples show error messages.

Invalid input file:

device# copy flash://config-file/ running-config 
Error: Input file does not exist 

device# copy usb://test running-config 
Error: Input file does not exist  

device# copy usb://test123 running-config 
Error: Input file does not exist 

Invalid user credentials:

device# copy scp://test:test@10.23.17.13/home/testuser/test123 running-config 
Error: Invalid user credentials. 

device# copy scp://test:test@10.23.17.13/home/testuser/test123 running-config  
Error: Host IP not reachable 

USB not enabled:

device# copy usb://test123 running-config  
Error: USB not enabled.