Skip to main content

DX Graph Backup and Restore

Backing up and restoring a DX Graph environment involves the following DX Graph resources:

  • Collection Metadata (which includes a Collection's schema and relationships)
  • Collection Data
  • Buckets
  • Files (that are stored in the Buckets)
  • Job Definitions
  • Triggers

Some settings are not included, such as Left Navigation for Sources, Master, and Taxonomies. You can reset those following these instructions.

Job Types

Backup DX Graph

Export DX Graph resources into an archive file and store it in a specific Bucket.

The archiving process will add collections in a sequence that satisfies inter-collection dependencies. For example, if Collection A has a relationship to Collection B, Collection B will be added to the archive before Collection A. This ensures that the data is restored in the correct order. The filename of the archive will look like dxgraph_20240507_110323.tar.gz.

Job Type Code: backupDxGraph

ParameterDescription
targetBucketCodeThe Bucket Code where the backup will be stored.
targetBackupFolderThe folder in the Bucket where the backup will be stored. If not specified, the archive file is stored in the root folder of the bucket.
bucketCodesAn array of Bucket Codes to backup. Default: All buckets.
skipBucketFilesSkip backing up files in the Buckets. Default: false.
collectionCodesAn array of Collection Codes to backup. Default: All collections.
skipCollectionDataSkip backing up data in the Collections. Default: false.
triggerCodesAn array of Trigger Codes to backup. Default: All triggers.
jobDefinitionCodesAn array of Job Definition Codes to backup. Default: All job definitions.

As with any Job Type, the backupDxGraph Job Type can be executed using the /_execute endpoint. Example Request:

POST {{SOLUTION_URL}}/job-types/backupDxGraph/_execute
Content-Type: application/json
X-Customer-Code: {{customerCode}}
Authorization: Bearer {{API_KEY}}

{
"params": {
"targetBucketCode": "incoming",
"targetBackupFolder": "my-backups"
}
}

The job will return a jobId. When you retrieve the details of the job, the response is an object with the following properties:

PropertyDescription
nbrBackedUpBucketsThe number of Buckets backed up.
backedUpBucketsAn array of Bucket Codes that were backed up.
nbrBackedUpTriggersThe number of Triggers backed up.
backedUpTriggersAn array of Trigger Codes that were backed up.
nbrBackedUpJobDefinitionsThe number of Job Definitions backed up.
backedUpJobDefinitionsAn array of Job Definition Codes that were backed up.
nbrBackedUpCollectionsThe number of Collections backed up.
backedUpCollectionsAn array of Collection Codes that were backed up.
archiveFilenameThe filename of the archive file that was created.

You can examine the Job Logs to see the details of the backup process.

Restore DX Graph

Imports DX Graph resources from an backup archive.

Job Type Code: restoreDxGraph

ParameterDescription
sourceCustomerCodeThe Customer Code where the backup is stored.
sourceBucketCodeThe Bucket Code where the backup is stored.
filenameThe path to the backup archive file in the Source Bucket. e.g. my-backups/dxgraph_20240507_110323.tar.gz
restoreBucketsRestore Buckets. Default: true.
bucketCodesAn array of Bucket Codes to restore. Default: All buckets.
skipBucketFilesSkip restoring files in the Buckets. Default: false.
restoreCollectionsRestore Collections. Default: true.
collectionCodesAn array of Collection Codes to restore. Default: All collections.
skipCollectionDataSkip restoring data in the Collections. Default: false.
restoreTriggersRestore Triggers. Default: true.
triggerCodesAn array of Trigger Codes to restore. Default: All triggers.
restoreJobDefinitionsRestore Job Definitions. Default: true.
jobDefinitionCodesAn array of Job Definition Codes to restore. Default: All job definitions.

When a DX Graph is restored:

  • Collection found in the archive are removed then recreated.
  • Buckets found in the archive are removed then recreated, and files are restored.
  • Triggers found in the archive are removed then recreated.
  • Job Definitions found in the archive are removed then recreated.

As with any Job Type, the restoreDxGraph Job Type can be executed using the /_execute endpoint. Example Request:

POST {{SOLUTION_URL}}/job-types/restoreDxGraph/_execute
Content-Type: application/json
X-Customer-Code: {{customerCode}} // Cutomer to restore to
Authorization: Bearer {{API_KEY}}

{
"params": {
"sourceCustomerCode": "my-old-customer",
"sourceBucketCode": "incoming",
"filename": "my-backups/dxgraph_20240507_110323.tar.gz"
}
}

The job will return a jobId. When you retrieve the details of the job, which may take a few minutes depending on the size of your data collections, the response is an object with the following properties:

PropertyDescription
nbrRestoredBucketsThe number of Buckets restored.
restoredBucketsAn array of Bucket Codes that were restored.
nbrRestoredTriggersThe number of Triggers restored.
restoredTriggersAn array of Trigger Codes that were restored.
nbrRestoredJobDefinitionsThe number of Job Definitions restored.
restoredJobDefinitionsAn array of Job Definition Codes that were restored.
nbrRestoredCollectionsThe number of Collections restored.
restoredCollectionsAn array of Collection Codes that were restored.
errorsAn array of errors that occurred during the restore process.

You can examine the Job Logs to see the details of the backup process.