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
Parameter | Description |
---|---|
targetBucketCode | The Bucket Code where the backup will be stored. |
targetBackupFolder | The 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. |
bucketCodes | An array of Bucket Codes to backup. Default: All buckets. |
skipBucketFiles | Skip backing up files in the Buckets. Default: false. |
collectionCodes | An array of Collection Codes to backup. Default: All collections. |
skipCollectionData | Skip backing up data in the Collections. Default: false. |
triggerCodes | An array of Trigger Codes to backup. Default: All triggers. |
jobDefinitionCodes | An 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:
Property | Description |
---|---|
nbrBackedUpBuckets | The number of Buckets backed up. |
backedUpBuckets | An array of Bucket Codes that were backed up. |
nbrBackedUpTriggers | The number of Triggers backed up. |
backedUpTriggers | An array of Trigger Codes that were backed up. |
nbrBackedUpJobDefinitions | The number of Job Definitions backed up. |
backedUpJobDefinitions | An array of Job Definition Codes that were backed up. |
nbrBackedUpCollections | The number of Collections backed up. |
backedUpCollections | An array of Collection Codes that were backed up. |
archiveFilename | The 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
Parameter | Description |
---|---|
sourceCustomerCode | The Customer Code where the backup is stored. |
sourceBucketCode | The Bucket Code where the backup is stored. |
filename | The path to the backup archive file in the Source Bucket. e.g. my-backups/dxgraph_20240507_110323.tar.gz |
restoreBuckets | Restore Buckets. Default: true. |
bucketCodes | An array of Bucket Codes to restore. Default: All buckets. |
skipBucketFiles | Skip restoring files in the Buckets. Default: false. |
restoreCollections | Restore Collections. Default: true. |
collectionCodes | An array of Collection Codes to restore. Default: All collections. |
skipCollectionData | Skip restoring data in the Collections. Default: false. |
restoreTriggers | Restore Triggers. Default: true. |
triggerCodes | An array of Trigger Codes to restore. Default: All triggers. |
restoreJobDefinitions | Restore Job Definitions. Default: true. |
jobDefinitionCodes | An 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:
Property | Description |
---|---|
nbrRestoredBuckets | The number of Buckets restored. |
restoredBuckets | An array of Bucket Codes that were restored. |
nbrRestoredTriggers | The number of Triggers restored. |
restoredTriggers | An array of Trigger Codes that were restored. |
nbrRestoredJobDefinitions | The number of Job Definitions restored. |
restoredJobDefinitions | An array of Job Definition Codes that were restored. |
nbrRestoredCollections | The number of Collections restored. |
restoredCollections | An array of Collection Codes that were restored. |
errors | An array of errors that occurred during the restore process. |
You can examine the Job Logs to see the details of the backup process.