copy {running-config | startup-config} <REMOTE-URL>

Syntax

copy {running-config | startup-config} <REMOTE-URL> {cli | json} [vrf <VRF-NAME>]

Description

Copies the running configuration or the startup configuration to a remote location as a file. The configuration can be exported to a file of either type CLI or type JSON format. The <VRF-NAME> is used for the configuration of interfaces on a particular VRF.

Command context

Manager (#)

Parameters

{running-config | startup-config}

Selects whether the running configuration or the startup configuration will be copied to a remote location as a file. Required.

<REMOTE-URL>

Specifies the remote target for copying the file. Required. The syntax is {tftp | sftp}://<IP-ADDRESS>[:<PORT-NUMBER>][;blocksize=<BLOCKSIZE-VALUE>]/<FILE-NAME>

{cli | json}

Selects whether the export file is in CLI or JSON format. Required.

vrf <VRF-NAME>

Specifies the VRF to receive the interface configuration. If a VRF is not specified, the default VRF is used. Optional.

Authority

Administrators

Examples

Copying a running configuration to a remote file in CLI format:

switch# copy running-config tftp://192.168.1.10/runcli cli vrf default
######################################################################### 100.0%
Success

Copying a running configuration to a remote file in JSON format:

switch# copy running-config tftp://192.168.1.10/runjson json vrf default
######################################################################### 100.0%
Success

Copying a startup configuration to a remote file in CLI format:

switch# copy startup-config sftp://root@192.168.1.10/startcli cli vrf default
root@192.168.1.10's password:
sftp> put /tmp/startcli startcli
Uploading /tmp/startcli to /root/startcli
Connected to 192.168.1.10.
Success

Copying a startup configuration to a remote file in JSON format:

switch# copy startup-config sftp://root@192.168.1.10/startjson json vrf default
root@192.168.1.10's password:
sftp> put /tmp/startjson startjson
Uploading /tmp/startjson to /root/startjson
Connected to 192.168.1.10.
Success