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 file in either CLI or JSON format.

Command context

Manager (#)

Parameters

{running-config | startup-config}

Selects whether the running configuration or the startup configuration is copied to a remote file.

<REMOTE-URL>

Specifies the remote file using the syntax: {tftp | sftp}://<IP-ADDRESS>[:<PORT-NUMBER>][;blocksize=<BLOCKSIZE-VALUE>]/<FILE-NAME>

{cli | json}

Selects the remote file format: P: CLI or JSON.

vrf <VRF-NAME>

Specifies the name of a VRF. Default: default.

Authority

Administrators or local user group members with execution rights for this command.

Examples

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

switch# copy running-config tftp://192.168.1.10/runcli cli
######################################################################### 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 
######################################################################### 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
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
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