copy running-config

Copies running configuration to the specified file to create a backup.

Syntax

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

Parameters

running-config
Specifies 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.

File path must be valid.

Target destination file must be reachable.

Examples

The following example copies running configuration to the specified file.

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

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

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

Invalid target file:

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

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

device# copy running-config scp://prabhus:prabhus@.1.2.2.2:/home/prabhus/test  
Error: Target file does not exist

Host IP not reachable:

device# copy running-config scp://test:test@1.1.1.1:/home/test/file  
Error: Host IP not reachable

USB not enabled:

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

Input file not specified:

device# copy running-config usb://  
Error: Input file not specified

Invalid user credentials:

device# copy running-config scp://prabhus:prabhus@.1.2.2.2:/home/prabhus/test  
Error: Invalid user credentials.

User role:

device# copy 
Unknown command