Manual Chapter :
Backing Up the Running Configuration
Applies To:
Show VersionsARX
- 6.3.0
The switch configuration that you edit with the CLI is called the running configuration, or running config. You can save the running config for the next reboot, disaster recovery, or for exporting the configuration from one switch to another.The running config is divided into two major components: the local-running config for the current switch, and global config for parameters that are shared by both switches in a redundant pair. This chapter explains how to save both config types and restore them later.
Before you begin backing up the configuration, you have the option to simplify FTP uploads and/or SCP transfers later. The running config exists in one or more local files, which you can copy to an external FTP or SCP server. The default FTP username/password is anonymous/upgrade-hostname, but you can enter a specific username/password for each copy. There is no default for SCP transfers. To avoid retyping FTP or SCP credentials each time, you can establish a default username and password for each transfer protocol FTP.
From cfg mode, use ip ftp-user to set the FTP username:
ip ftp-user username
where username is 1-32 characters.
From the same mode, you can also (or instead) use ip scp-user to set a default username for SCP:
ip scp-user username
where, as above, username is 1-32 characters.
bstnA(cfg)# ip ftp-user juser
Password: jpasswd
Validate Password: jpasswd
bstnA(cfg)# ip scp-user juser
Password: jpasswd
Validate Password: jpasswd
bstnA(cfg)# ...
The next step in saving the running configuration is to save the local running config. The local running config applies only to the current switch: this config includes network and chassis parameters. From priv-exec mode, use the copy running-config command to save the local config as an executable script.
copy running-config scripts destination-file
scripts is the destination directory, and
destination-file (1-1024 characters) is a name you choose for the running-config file.
bstnA(cfg)# exit
bstnA# copy running-config scripts running
bstnA# show scripts
username:password@ (optional) is an FTP username and password (the default is the username/password set by the ip ftp-user command, described above),
ftp-site identifies the FTP server with an IP address or FQDN (for example, 172.16.88.3 or ftp.myftpsite.com), and
file is the chosen file name. Lead with an extra / if the path starts at the root of the server machine; for example, aramis//var/cfg/running-config specifies /var/config/running-config on server aramis. Omit the leading slash if the file is going to the home directory for username.
bstnA(cfg)# exit
bstnA# copy running-config ftp://juser:jpasswd@ftp.wwmed.com/oct24lcl
bstnA# ...
username@ (optional) is a valid username at the remote host (the default is the username set by the ip scp-user command, described above),
server identifies the SCP server with an IP address or FQDN (for example, 172.16.100.18 or deb1.mynet.com), and
file is the chosen file name. Lead with a slash (scp-server:/file) if the file path is absolute. Without the slash, the path is presumed to start in the home directory for username.
accept-host-key (optional) tells the CLI to accept an unknown host key if offered by the SCP server. The host key authenticates the server; if the key is unknown, it is possible that an attacker has taken the servers hostname and/or IP address. Note that any SCP server is unknown if the switch has not had an SCP exchange with it since the switchs last reboot.
The CLI prompts for the usernames password, unless you set up a default with the ip scp-user command. If the prompt appears, enter a password that is valid at the remote site.
bstnA(gbl)# exit
bstnA# copy running-config scp://rh1.wwmed.com:oct24running
bstnA# ...
You can also place the config file into an ARX volume. You can use the nfs or cifs clause to send the config file to a given directory in a given volume:
cifs | nfs is a required choice. This is the network protocol used to transfer the config file to the ARX volume.
namespace (1-30 characters) identifies the destination namespace.
volume (1-1024 characters) is the destination-volume name.
dest-path (1-1024 characters) is the intended path from the volume root (above) to the config file. The directory you specify here must exist on the volume.
bstnA(cfg)# exit
bstnA# copy running-config cifs medarcv /rcrds admin/oct24running
bstnA# ...
You can alternatively send the running-config file as an E-mail attachment. Before you use E-mail, you must configure the Simple Mail Transfer Protocol (SMTP) on the switch, starting with the smtp command in cfg mode: see the chapter on E-mail and SMTP in the ARX® CLI Reference.
e-mail-address (optional) identifies the recipient of the E-mail message (for example, myCoWorker@myco.com). If you omit this, it defaults to the E-mail recipient set with the cfg-smtp to command. Use a slash (/) to separate this from the file name.
file is the chosen file name.
bstnA(cfg)# smtp
bstnA(cfg-smtp)# mail-server email1.wwmed.com
bstnA(cfg-smtp)# from admin@acopia.wwmed.com
bstnA(cfg-smtp)# exit
bstnA(cfg)# exit
bstnA# copy running-config smtp://juser@wwmed.com/oct24running
bstnA# ...
You can send the current local config to the screen without saving it to a file. Use the show running-config command to view all the CLI commands required to re-create the local running-config.
bstnA> show running-config
The next step in saving the running configuration is to save the global-config parameters. The global config is the part of the configuration that is shared among both ARXes in a redundant pair: this includes namespace and policy parameters. From priv-exec mode, use the copy global-config command to save the global config to an executable script file.
copy global-config scripts destination-file
scripts is the destination directory, and
destination-file (1-1024 characters) is a name you choose for the global-config file.
bstnA(cfg)# exit
bstnA# copy global-config scripts global
bstnA# show scripts
username:password@ (optional) is an FTP username and password (the default is the username/password set by the ip ftp-user command),
ftp-site identifies the FTP server with an IP address or FQDN (for example, 172.16.88.3 or ftp.myftpsite.com), and
file is the chosen file name. As with other FTP copies, use two slashes (ftp-site//file) if the file path is absolute.
bstnA(gbl)# exit
bstnA# copy global-config ftp://juser:jpasswd@ftp.wwmed.com//var/oct24gbl
bstnA# ...
username@ (optional) is a valid username at the remote host (the default is the username set by the ip scp-user command, described earlier),
server identifies the SCP server with an IP address or FQDN (for example, 172.16.100.12 or host.mynet.com), and
file is the chosen file name. Lead with a slash (scp-server:/file) if the file path is absolute. Without the slash, the path is presumed to start in the home directory for username.
accept-host-key (optional) tells the CLI to accept an unknown host key if offered by the SCP server. The host key authenticates the server; if the key is unknown, it is possible that an attacker has taken the servers hostname and/or IP address. Note that any SCP server is unknown if the switch has not had an SCP exchange with it since the switchs last reboot.
The CLI prompts for the usernames password, unless you set up a default with the ip scp-user command. If the prompt appears, enter a password that is valid at the remote site.
bstnA(gbl)# exit
bstnA# copy global-config scp://rh1.wwmed.com:/var/oct24gbl
bstnA# ...
You can also place the config file into an ARX volume. You can use the nfs or cifs clause to send the config file to a given directory in a given volume:
cifs | nfs is a required choice. This is the network protocol used to transfer the config file to the ARX volume.
namespace (1-30 characters) identifies the destination namespace.
volume (1-1024 characters) is the destination-volume name.
dest-path (1-1024 characters) is the intended path from the volume root (above) to the config file. The directory you specify here must exist on the volume.
bstnA(cfg)# exit
bstnA# copy global-config cifs medarcv /rcrds admin/oct24gbl
bstnA# ...
You can alternatively send the global-config file as an E-mail attachment, as shown above for the running-config. Before you use E-mail, you must configure the Simple Mail Transfer Protocol (SMTP) on the switch, starting with the smtp command in cfg mode: see the chapter on E-mail and SMTP in the ARX® CLI Reference.
e-mail-address (optional) identifies the recipient of the E-mail message (for example, myCoWorker@myco.com). If you omit this, it defaults to the E-mail recipient set with the cfg-smtp to command. Use a slash (/) to separate this from the file name.
file is the chosen file name.
bstnA(cfg)# smtp
bstnA(cfg-smtp)# mail-server email1.wwmed.com
bstnA(cfg-smtp)# from admin@acopia.wwmed.com
bstnA(cfg-smtp)# to juser@wwmed.com
bstnA(cfg-smtp)# exit
bstnA(cfg)# exit
bstnA# copy global-config smtp://oct24gbl
bstnA# ...
You can send the current global config to the screen without saving it to a file. Use the show global-config command to view all the CLI commands required to re-create the global config.
bstnA> show global-config
You can show an individual group of commands from the show global-config output:
filer shows the external-filer section of the report, |
namespace shows the namespace section, |
schedule shows all policy schedules, |
security shows all sections related to security (such as group, radius-server, and authentication), |
global-server focuses on the global-server section, |
nfs shows the nfs section, and |
cifs shows the cifs section. |
bstnA> show global-config security
name (1-30 characters) identifies the namespace,
where name (1-255 characters) is the fully-qualified domain name (FQDN) for the front-end service.
bstnA> show global-config namespace medarcv
The startup config is a combination of the running config and the global config. You can save the startup config as a single file. From priv-exec mode, use the copy startup-config command to save the startup config to an executable script file.
copy startup-config scripts destination-file
scripts is the destination directory, and
destination-file (1-1024 characters) is a name you choose for the startup-config file.
bstnA(cfg)# exit
bstnA# copy startup-config scripts start_conf
bstnA# show scripts
Use a URL in the copy startup-config command to save the startup config to an FTP site:
username:password@ (optional) is an FTP username and password (the default is the username/password set by the ip ftp-user command),
ftp-site identifies the FTP server with an IP address or FQDN (for example, 172.16.88.3 or ftp.myftpsite.com), and
file is the chosen file name. As with other FTP copies, use two slashes (ftp-site//file) if the file path is absolute.
bstnA(gbl)# exit
bstnA# copy startup-config ftp://juser:jpasswd@ftp.wwmed.com/feb6startup
bstnA# ...
where the options were defined for uploading the running-config (recall Saving the Config Off to an SCP Server).
The CLI prompts for the usernames password if there is no ip scp-user defined. If the password prompt appears, enter a password that is valid at the remote site. Then a message shows the results of the copy operation.
bstnA(gbl)# exit
bstnA# copy startup-config scp://juser@rh1.wwmed.com:/var/feb6startup
Password: jpasswd
bstnA# ...
You can also place the config file into an ARX volume. You can use the nfs or cifs clause to send the config file to a given directory in a given volume:
cifs | nfs is a required choice. This is the network protocol used to transfer the config file to the ARX volume.
namespace (1-30 characters) identifies the destination namespace.
volume (1-1024 characters) is the destination-volume name.
dest-path (1-1024 characters) is the intended path from the volume root (above) to the config file. The directory you specify here must exist on the volume.
bstnA(cfg)# exit
bstnA# copy startup-config cifs medarcv /rcrds admin/feb6startup
bstnA# ...
You can alternatively send the startup-config file as an E-mail attachment, as shown above for the global-config and running-config. Before you use E-mail, you must configure the Simple Mail Transfer Protocol (SMTP) on the switch, starting with the smtp command in cfg mode: see the chapter on E-mail and SMTP in the ARX® CLI Reference.
where the options were defined for mailing the running-config (recall Sending the Config to an E-Mail Recipient).
bstnA(cfg)# smtp
bstnA(cfg-smtp)# mail-server email1.wwmed.com
bstnA(cfg-smtp)# from admin@acopia.wwmed.com
bstnA(cfg-smtp)# to juser@wwmed.com
bstnA(cfg-smtp)# exit
bstnA(cfg)# exit
bstnA# copy startup-config smtp://feb6startup
bstnA# ...
username:password@ (optional) is an FTP username and password (the default is the username/password set by the ip ftp-user command),
ftp-site identifies the FTP server with an IP address or FQDN (for example, 172.16.88.3 or ftp.myftpsite.com),
file is the script name at the server (lead with an extra / if the path is absolute),
scripts specifies the directory for the destination file, and
destination is the script name at the chassis.
bstnA> enable
bstnA# copy ftp://juser:jpasswd@ftp.wwmed.com/feb6startup scripts start_conf
bstnA> enable
bstnA# delete startup-config
bstnA# reload
SWITCH login: admin
Password: password
From priv-exec mode, use the run command to run each running-config script:
run scripts script-name
where script-name (1-1024 characters) identifies the running-config script. Use show scripts for a list of available scripts.
SWITCH> enable
SWITCH# show scripts
SWITCH# run scripts start_conf
Important: Do not restore the same running-config to both peers. The running-config includes the switchs private subnet, which must be unique to both peers. In fact, the private subnet must be unique in the switchs entire RON; see Resolving Conflicting Subnets, on page 6-13 of the ARX® CLI Network-Management Guide.
For instructions on joining a redundant pair, refer to Enabling Redundancy, on page 7-19 of the ARX® CLI Network-Management Guide.
SWITCH# run scripts running
prtlndA# ...
SWITCH# run scripts running-B
prtlndB# ...
Wait for the peers to join. Use the show redundancy command: when both peers and the quorum disk are Up, the pair is complete.
prtlndA(cfg-redundancy)# show redundancy
prtlndA# run scripts global
prtlndA# ...
There is a special consideration you must take into account when restoring a configuration to an ARX-2500 pair, if the configuration changes the setting of the resource-profile command.
After executing the resource-profile command on both devices in the pair, you must execute the dual-reboot command to reboot both devices at once. This is true also if you replay a running-config script with the resource-profile legacy setting. (One method of replaying a running-config is to save the file on the ARX-2500 and use the run command.) After replaying the config script, you must reload the ARX-2500 for resource-profile legacy to take effect.
SWITCH# run scripts running-B
prtlndB# ...