PMP 13.3 - Configuration export and import (feature brief)

PMP 13.3 adds support for importing and exporting the configuration from the AP or SM as a text file. The configuration file is in JSON format. To be able to export or import the configuration file, the logged in user needs to be an ADMINISTRATOR and it must not be a “read-only” account. (The “read-only” option is newly introduced in 13.3).

The exported configuration file contains the complete configuration including all the default values. To keep a backup of the current configuration, the file can be saved as-is and imported later.

When importing a configuration file, you can either import the full configuration or a sparse configuration containing on the items that need to be changed. If a sparse configuration file is imported, only the items in the file will be imported. Other configuration will stay the same. You can also use a special flag in the configuration file to tell the device to apply the configuration starting from facory default. See "Special Headers" section below.

The export the configuration from the GUI:

Login to the GUI and go to “Configuration > Unit Settings” tab. Go to the “Download Configuration File” section and click on the “[mac].cfg” link, where [mac] is the MAC address of the device (for example, “01003ea2c274.cfg”). Save the file to the local disk.

To import the configuration from the GUI:

Login to the GUI and go to “Configuration > Unit Settings” tab. Go to the “Upload and Apply Configuration File” section. Click on “Browse” button and select the configuration file from disk. Then click “Upload”. The click on “Apply Configuration File” button. The “Status of Configuration File” section will show the results of the upload. Review it to make sure there are no errors. Then click on “Reboot” to reboot with the imported configuration.

To export the configuration file via SNMP:

You can export the configuration file to an FTP server using the WHISP-BOX-MIBV2-MIB::exportConfigFile (.1.3.6.1.4.1.161.19.3.3.3.8) OID. Pass the FTP URL as a parameter. You can include a username/password in the URL using the standard convention (see example below). Also make sure the FTP server location has write access enabled so the configuration file can be saved here.

Example:

$ snmpset -v 2c -c Canopy 192.168.0.1 .1.3.6.1.4.1.161.19.3.3.3.8.0 s ftp://user:password@192.168.1.1/config.json

To import the configuration file via SNMP:

You can import the configuration file from an FTP server using the WHISP-BOX-MIBV2-MIB::importConfigFile (.1.3.6.1.4.1.161.19.3.3.3.7) OID. Copy the configuration file to an FTP server that is reachable from the AP or SM. Then invoke the above OID with the FTP URL as the parameter. This will result in the configuration file getting downloaded and imported into the device. Reboot the device to boot up with the new configuration.

Example:

$ snmpset -v 2c -c Canopy 192.168.0.1 .1.3.6.1.4.1.161.19.3.3.3.7.0 s ftp://user:password@192.168.1.1/config.json

Any error messages for the import and export operation can be found in the system logs. 

Special Headers

You can add a "configFileParameters" section to the header to control the behaviour of the device when importing configuration.

{
  "cfgFileString": "Canopy configuration file",
  "cfgFileVersion": "1.0",
  "configFileParameters": {
    "setToDefaults":true,
    "rebootIfRequired":true,
  }
}
 
The "setToDefaults" when set to "true" tells the device to reset to actory default configuration and apply the confiuration in the file on top of that. So any attibute not in the configuration file will be set to it's factory default value. By default, the configuration in the file is merged with the existing configuration on the device.
 
The "rebootIfRequired" flag when set to "true" tell the device to reboot automatically if needed to apply the configuration change. By default, the device will not reboot automatically.
2 Likes