Saving the running configuration
How to save the running configuration and specify locations for the configuration file.
You can save the configuration to a file for your own use; for example copying to another device, by using the save <filename> command in configuration mode.
vyatta@R1# save testconfig
Saving configuration to '/config/testconfig'...
Done
vyatta@R1#
The running configuration is saved automatically when you enter commit or commit-confirm. Entering the save command without a filename has no effect.
vyatta@R1# save
Saving configuration to '/config/config.boot'...
'commit' saves configuration. This command has no effect
vyatta@R1#
You can also save a configuration file to a location path other than the standard configuration directory by specifying a different path. You can save the file to a hard drive, flash memory, or USB device.
Note that the save command writes only committed changes. If you try to save uncommitted changes, the system warns you that it is saving only the committed changes.
Specifying locations for the configuration file shows how to specify the syntax for files from different file locations when you save files in configuration mode.
Location | Specification |
---|---|
An absolute path | Use standard UNIX file specification. |
A relative path | Specify the path name relative to the location configured for the config-directory parameter of the rtrmgr configuration node. |
TFTP server | Use the following syntax for file-name: tftp://ip-address /config-file where ip-address is the IP address of the TFTP server, and config-file is the configuration file, including the path relative to the TFTP root directory. |
FTP server | Use the following syntax for file-name: ftp://ip-address /config-file where ip-address is the IP address of the FTP server, and config-file is the configuration file, including the path. If you use FTP, you are prompted for a user name and password. |
HTTP server | Use the following syntax for file-name: http://ip-address /config-file where ip-address is the IP address of the HTTP server, and config-file is the configuration file, including the path. |