To export Junos configuration in display set format, the CLI command can be used:
show configuration | display set | save <filename>
EXPORT CONFIGURATION:1. Example for exporting Junos configuration in display-set format:
{primary:node0} user1@host1> show configuration | display set | save vsrx3-1_display-set.conf Wrote 59 lines of output to 'vsrx3-1_display-set.conf'
2. You can specify the file location as well by indicating the path preceding the filename for
ex.: show configuration | display set | save /var/tmp/vsrx3-1_display-set.conf
The file location is by default /var/home/<user> in this example it's /var/home/labroot/:
{primary:node0} user1@host1> file list /var/home/labroot/: vsrx3-1_display-set.conf
IMPORT CONFIGURATION:
If the configuration file was edited, it can be loaded back from the "set" format in the following way using the CLI command "load set <filename>":
{primary:node0} user1@host1> configure {primary:node0}[edit] user1@host1# load set vsrx3-1_display-set.conf load complete
CHECK:
To check the changes compiled by Junos if any.
user1@host1# show | compare
{primary:node0}[edit] user1@host1# commit check node0: configuration check succeeds
{primary:node0}[edit] user1@host1# commit and-quit node0: commit complete Exiting configuration mode