Vyatta Network OS Documentation

Learn how to install, configure and operate the Vyatta NOS, which helps drive our virtual networking & physical platforms portfolio.

save

Saves the running configuration to a file.

save file-name
file-name
The name of a file in which the information is to be saved, including the path to the file.

Configuration mode

Use this command to save the running configuration to a file.

The resulting file can later be loaded into the running system to replace the previous running configuration by using load. A nonabsolute path is interpreted relative to the default configuration directory, which is /config.

The following table shows how to specify the syntax for files from different file locations.

Table 1. Specifying locations for the configuration file
Location Specification

An absolute path

Use standard UNIX file specification.

A relative path

Specify the path name relative to the default configuration directory.

FTP server

Use the following syntax for file-name:

ftp://user:passwd@host /config-file

where user is the username on the host, passwd is the password associated with the username, host is the host name or IP address of the FTP server, and config-file is the configuration file, including the path.

If you do not specify user and passwd, you are prompted for them.

SCP server

Use the following syntax for file-name:

scp://user:passwd@host /config-file

where user is the username on the host, passwd is the password associated with the username, host is the host name or IP address of the SCP server, and config-file is the configuration file, including the path.

If you do not specify user and passwd, you are prompted for them.

HTTP server

Use the following syntax for file-name:

http://host /config-file

where host is the host name or IP address of the HTTP server, and config-file is the configuration file, including the path.

TFTP server

Use the following syntax for file-name:

tftp://host /config-file

where host is the host name or IP address of the TFTP server, and config-file is the configuration file, including the path relative to the TFTP root directory.

If you overwrite a configuration file, the system retains one backup, using a file-name~ convention. For example, if you write over my-config.boot, the system moves the previous file to my-config.boot~.

Note that the save command writes only committed changes. If you make configuration changes and try to save them, the system warns you that you have uncommitted changes and then saves only the committed changes.

CAUTION: If your login user is not a member of the login user group "secrets" and you save a configuration either through the REST API or use the save command, the encrypted passwords in the configuration file are replaced with the ******** placeholder. If you load this configuration, the replaced password fields trigger validation errors because the placeholder does not match the format for an encrypted password. Do not commit this configuration. If you ignore the error message and perform a commit with this invalid configuration, the passwords are deleted.

The following example shows how to save the running configuration to the my-config file in the default configuration directory, exit configuration mode, and display the set of files stored in the configuration directory.

vyatta@vyatta# save my-config
Saving configuration to '/config/my-config'...
Done
vyatta@vyatta# exit
vyatta@vyatta# show files /config
total 24K
-rw-rw-r-- 1 Vyatta xorp 2.8K Nov 28 10:30 config.boot
-rw-rw-r-- 1 Vyatta xorp 2.8K Nov 27 14:32 config.boot~
-rw-rw-r-- 1 Vyatta xorp 2.8K Nov 28 10:30 my-config
-rw-rw-r-- 1 Vyatta xorp 2.8K Nov 27 21:50 my-config~
vyatta@vyatta:~$

The following example shows how to save the current running configuration to the my-config file in the root directory of a TFTP server at 10.1.0.35.

vyatta@vyatta# save tftp://10.1.0.35/my-config
Saving configuration to 'tftp://10.1.0.35/my-config'...
Done
vyatta@vyatta#