[[dcb-requisition]]
= Create Requisition for Device Configuration Backup
:description: How to create a requisition for device configuration backup in {page-component-title}.

After you have xref:operation:deep-dive/device-config-backup/ssh.adoc#backup-script[created a backup script for each device type] and xref:operation:deep-dive/device-config-backup/configuration.adoc#poller-config[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, {page-component-title} never schedules the device config backup (see xref:reference:service-assurance/monitors/DeviceConfigMonitor.adoc[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., and `0 0 1 * * ?` runs every 24 hrs at 1:00 a.m.

. In the web UI, click menu:Manage Inventory[Provisioning Requisitions] in the side menu.
. Or, click menu:Administration[Configure OpenNMS] in the side menu, then choose menu: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 the *Edit* symbol and click *Add Node*.
. Set up your requisition as described in xref:operation:quick-start/inventory.adoc#requisition-create[Create a requisition].
. Add one or more `DeviceConfig` services on the interface where you are backing up the config.
** If a device has multiple config types, use the prefix `DeviceConfig-` to add services.
+
For example, you can 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 xref:operation:deep-dive/meta-data.adoc#ga-metadata-scv[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 is `never`)
.. `dcb:retention-period`: an optional Java `Period` expression to specify the length of time before "stale" configuration data is deleted from the database (default is `P1Y`, 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*.

