export_settings and import_settings

export_settings and import_settings

The export_settings and import_settings are CLI features that allow you to export/import the entire or partial (subtree or the configuration of a given path) configuration in a text format. The input and output can be a file or standard input/output (copy/paste).  It can be used at the root of the configuration menus to get all of the settings, or at a specific level (i.e. 'cd /settings/network_connections' first) to get a more limited set.  If you use the --file option, it will write to the home directory of the user you are logged in as.


export_setting options

export_settings [cli-path] [arguments]

where arguments can be:
--with-options - provide a list of choices for value
--include-empty - generate parameter line even if no value
--not-enabled - generate parameter line even if parameter not active
--plain-password - plain plain/hash password
--file <local-pathname> - output to a local file


import_settings options

import_settings [arguments]

where arguments can be:
--file <local-pathname> - local file input
--overwrite-tables - overwrite table when its configuration is given
--quiet - suppress report of success/failure per path, just output final counters.

In interactive mode (no --file given) the administrator can type the lines or paste them. The command is finalized by <ctrl>D



Below is an example to export the managed device named "dvs"
Exporting:
[admin@nd2 /]# export_settings /settings/devices/dvs/ --plain-password --file dvs_settings

If you want to export the passwords as well, use the option --plain-password
[admin@nd2 /]# export_settings /settings/devices/dvs/ --plain-password --file dvs_settings

The file named "dvs_settings" will be saved inside the user's home directory. In this case it is /home/admin. The file can be accessed by going to shell. From the shell you can use scp to transfer the file to another nodegrid or you can download it using filemanager tool available in the GUI. In the filemanager the path for the admin's home directory is  /Home/admin_home

[admin@nd2 /]# shell 
admin@nd2:~$ pwd
/home/admin
admin@nd2:~$ ls
dvs_settings


If you want other users to access the file you can save it under /var/sw.  In the filemanager the directory name is /Home/software
[admin@nd2 /]# export_settings /settings/devices/dvs/ --file /var/sw/dvs_settings

Importing: 
copy the file to admin 's home directory using scp or filemanager

[admin@nd1 /]# import_settings --file /home/admin/dvs_settings
Path: /settings/devices/dvs/access Result: succeeded
Path: /settings/devices/dvs/management Result: succeeded
Path: /settings/devices/dvs/logging Result: succeeded
Path: /settings/devices/dvs/commands/console Result: succeeded
Path: /settings/devices/dvs/commands/data_logging Result: succeeded
Path: /settings/devices/dvs/commands/web Result: succeeded
Processed paths: 6 Rejected paths: 0

If you try to import with another user you will get an error, since the other user will not have permissions to read the files in the /home/admin directory.
[test@nd1 /]# import_settings --file /home/admin/dvs_settings
Error: Invalid filename 

Instead you can save the file to /var/sw 
[test@nd1 /]# import_settings --file /var/sw/dvs_settings 


Note: Also the user needs to have sufficient privileges to apply the settings

    • Related Articles

    • Improved Nodegrid UI for backup

      New for Nodegrid 6.0, the user interface for Nodegrid Save Settings (backup) is improved. Previously, the backup option from System::Toolkit::Save_Settings would save backups to the main disk to the root location /backup when you select "Local ...
    • LLDP Settings

      Nodegrid supports LLDP on its network interfaces. The Nodegrid advertises its identity and capabilities information on the LAN, as well as receiving same information from other devices with this feature enabled. To enable LLDP on the NodeGrid, follow ...
    • IPSec Advanced Settings

      Version 0.1 (02 May 2018) Advanced IPSec Settings The available IPSec implementation supports a wide range of additional settings which can be used to adjust the behavior and security. The samples in this guide only highlight the basics. Below is a ...
    • Auditing and Data Logging Settings

      The Auditing feature allows the data and event logging to be stored locally or remotely via NFS which is sent by an Email or a SNMP Trap or sent through a Syslog server. Data Logging captures Data string coming from and going to Target devices as ...
    • Requirements and Environmental Policies

      ZPE Systems helps customers adhere to their specific compliance requirements and environmental policies with an expanding list of standards and technical partner certifications: Environmental Policy REACH Compliance ROHS Statement WEEE NERC ...