Create Requisition for Device Configuration Backup
After you have created a backup script for each device type and configured the TFTP port, you can create a requisition for each device whose configuration you want to back up.
To activate the device configuration backup, you must add metadata that defines the device configuration backup script you created for the node’s device type, and the device’s username and password.
We recommend you also add metadata to overwrite the default device configuration backup schedule.
By default, Horizon never schedules the device config backup (see Device Config Monitor for details).
It is still possible to retrieve backups on demand by using the Web UI or the REST services.
Specify a backup schedule in the form of a cron expression to overwrite default behavior.
To prevent all devices fetching the configuration at the same time, it is better to space out the schedule.
For example, 0 0 0 * * ?
runs every 24 hrs at 12:00 a.m. 0 0 1 * * ?
runs every 24 hrs at 1:00 a.m.
-
Log in to OpenNMS and click the gears icon.
-
Choose Provisioning>Manage Provisioning Requisitions.
-
Click Add Requisition and enter a name for the requisition. If you want to enable device config backup on existing nodes in a requisition, select the desired requisition and edit the node definition.
-
Click on the edit icon and click Add Node.
-
Set up your requisition as described in Create a requisition.
-
Add one or more
DeviceConfig
services on the interface where we are backing up the config.-
If a device has multiple config types, use the prefix
DeviceConfig-
to add services.For example use
DeviceConfig-running
to specify a configuration that the device currently has while running.
The UI displays this as "Running Configuration".For
DeviceConfig-running-xml
, the UI displays "Running Xml Configuration".
-
-
Click Add Meta-Data, and define the following key-value pairs:
-
dcb:username
: username for the device. This can also be an SCV metadata expression. -
dcb:password
: password for the device. This can also be an SCV metadata expression. -
dcb:script-file
: name of the device configuration script for this type of device without .dcb extension. Note that if you have multiple configurations for the same device, the script file name should be different for each. -
dcb:schedule
: a cron expression to specify the time to fetch the device backup configuration (default isnever
) -
dcb:retention-period
: an optional JavaPeriod
expression to specify the length of time before "stale" configuration data is deleted from the database (default isP1Y
, one year).
-
-
Click Save to save the metadata and then Save to save the requisition.
-
Click Return and click Synchronize.
-
Choose a scan option and click Synchronize.