Handling inactive configuration files¶
Save a configuration¶
In edition mode, the save
command can export the staging configuration
in a xml
file.
vrouter running config# save file config.xml
Saving in /home/admin/.config/nc-cli/conf/config.xml
vrouter running config#
Load a configuration¶
In edition mode, the load
command sets the staging configuration from
a previously saved configuration file.
vrouter running config# load file config.xml
Loading a new configuration will overwrite current.
Are you sure? [y/N] y
Loading configuration /home/admin/.config/nc-cli/conf/config.xml
vrouter running config#
The staging configuration can also be set to the startup configuration with the following command:
vrouter running config# load startup
Loading a new configuration will overwrite current.
Are you sure? [y/N] y
Loading configuration startup
Copying and removing configurations¶
From edition or operational mode, it is possible to copy and remove configurations.
Here are some examples:
vrouter> copy running startup
Overwrite startup configuration? [y/N] y
vrouter> copy running file running.xml
vrouter> copy startup file startup.xml
vrouter> copy file config.xml file config2.xml
vrouter> copy xml file config.json file config2.xml
vrouter> remove startup
Definitively remove startup? [y/N] y
ubuntu1804 running config# remove file config.xml
Definitively remove /home/user/.config/nc-cli/conf/config.xml? [y/N] y
To be certain that the startup configuration is a valid one, only the running configuration can be copied to startup.
Importing and exporting configurations¶
From edition or operational mode, it is possible to import and export configurations:
vrouter> import config.xml http://server/path/to/config.xml
vrouter> import config.json https://server/path/to/config.json
vrouter> import config.xml ftp://user:password@server/path/to/config.xml
vrouter> export config.xml ftp://user:password@server/path/to/config.xml