load
Loads from a file a configuration that was previously saved.
- file-name
- The name of a configuration file, including the full path to its location.
Configuration mode
Use this command to load from a file a configuration that was previously saved.
The loaded configuration becomes the working configuration and must be committed before it becomes the active configuration.
Configuration can be loaded from a hard disk (including a Flash disk or USB device), a TFTP server, an FTP server, an SCP server, or an HTTP server. Note that you cannot load an empty configuration file; the configuration file must contain at least one configuration node. In addition, an error is reported if an invalid configuration file is loaded.
The default configuration directory is /config.
The following table shows how to specify the syntax for files from different file locations.
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. |
The following example shows how to load the testconfig file from the default configuration directory.
vyatta@vyatta# load testconfig
Loading config file /config/testconfig...
Load complete. Use 'commit' to make changes active.
[edit]
vyatta@vyatta#