You have generated an MD-SAL module.
mvn clean install
on this project.mvn clean install
if you haven't already. This will generate some code from the yang models.The purpose of this ODL feature is to support local and geo-redundancy by providing a way to back up and retrieve MD-SAL data exports to and from a Sonatype Nexus server. In order to function, this module requires the controller to have an installation of the data-export-import
module and a valid export of MD-SAL data.
MD-SAL Backup can be achieved using the daexim-offsite-backup:backup-data
RPC either through the RESTConf portal or through a tool such as cURL or Postman. While no input is required for this RPC, the RPC does require the operational, models, and config .JSONs to be present in the daexim directory of the controller.
export USER=user export PASSWORD=password export ODL_HOST=https://yourhost.com:8181 curl -X POST -u$USER:$PASSWORD ${ODL_HOST}/restconf/operations/daexim-offsite-backup:backup-data
Through this process a timestamped archive is created in the form of POD_NAME-yyyyMMdd_HH-odl_backup.zip
where POD_NAME
is the name of the ODL, specified through the properties file or through an environment variable.
MD-SAL Retrieval can be achieved by using the daexim-offsite-backup:retrieve-data
RPC either through the RESTConf portal or through a tool such as cURL or Postman. This RPC requires timestamp information and may be supplied with an optional podName.
export USER=user export PASSWORD=password export ODL_HOST=https://yourhost.com:8181 export TARGET_ODL=targetOdlPodName export TIMESTAMP=yyyyMMdd_HH export DATA= ' { "input": { "pod-name": "'"$TARGET_ODL"'", "timestamp": "'"$TIMESTAMP"'" } }' curl -X POST -u$USER:$PASSWORD --data $DATA ${ODL_HOST}/restconf/operations/daexim-offsite-backup:retrieve-data
Through this process an archive with the specified timestamp (and optional pod name) is downloaded from the Nexus server and extracted into the controller's daexim directory. After this it is up to the user to trigger an MD-SAL import.
Before each RPC execution this module pulls information from a user supplied properties file. The module expects to find:
Refer to the example properties file
If the module cannot find the properties file it will default to generic values and attempt to move forward.