Handling inactive configuration files¶
Save a configuration¶
In edition mode, the save
command can export the staging configuration
in a xml
file.
vsr running config# save file config.xml
Saving in /home/admin/.config/nc-cli/conf/config.xml
vsr running config#
Load a configuration¶
In edition mode, the load
command sets the staging configuration from
a previously saved configuration file.
vsr 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
vsr running config#
The staging configuration can also be set to the startup configuration with the following command:
vsr running config# load startup
Loading a new configuration will overwrite current.
Are you sure? [y/N] y
Loading configuration startup
An already committed configuration can also be loaded:
vsr running config# show commit
commit id date user description
========= ==== ==== ===========
2 23/02/28 15:01:07 CET admin
1 23/02/28 15:00:59 CET admin
vsr running config# load commit 1
Loading a new configuration will overwrite current.
Are you sure? [y/N] y
Loading commit 1
Note
The commit ID can also be retrieved in the state with:
show state system commit-history
.
Copying and removing configurations¶
From edition or operational mode, it is possible to copy and remove configurations.
Here are some examples:
vsr> copy running startup
Overwrite startup configuration? [y/N] y
vsr> copy running file running.xml
vsr> copy startup file startup.xml
vsr> copy file config.xml file config2.xml
vsr> copy xml file config.json file config2.xml
vsr> copy commit 1 file config3.json
vsr> 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:
vsr> import config.xml http://server/path/to/config.xml
vsr> import config.json https://server/path/to/config.json
vsr> import config.xml ftp://user:password@server/path/to/config.xml
vsr> export config.xml ftp://user:password@server/path/to/config.xml