xdmp.databaseBackupStatus( jobid as (Number|String)[], [hostid as (Number|String)[]] ) as ObjectNode*
Checks the status of the outstanding backup job with the specified job ID. Returns a database backup status as a JSON node. If you don't specify a job ID for the first parameter, status for all currently running backup jobs will be returned.
Parameters | |
---|---|
jobid | A backup job ID. |
hostid | The ID of the host that the backup was started on. |
http://marklogic.com/xdmp/privileges/xdmp-database-backup-status
If the host coordinating the backup restarts, information about the backup will be lost.
The structure of the data returned is as follows:
forest
This is an object with the following properties:
forest-name
forest-id
status
restore-to-time
journal-archiving
journal-archive-path
safe-restore-to-time
journal-archive-lag-limit
host-name
backup-path
incremental-backup-path
job-id
status
xdmp.databaseBackupStatus( xdmp.databaseBackup( xdmp.databaseForests(xdmp.database("Documents")), "/space/backup" ) ) => { "jobId": "13024644333983038299", "status": "in-progress", "forests": [ { "forestName": "Documents", "forestId": "15810433344251984001", "status": "in-progress", "hostName": "host1.marklogic.com", "backupPath": "/space/backup/20150807-1358346259160", "incrementalBackup": false, "journalArchiving": false } ] }
xdmp.databaseBackupStatus([], xdmp.hosts()) => { "jobId": "7138588173658949103", "status": "completed", "forests": [ { "forestName": "Documents", "forestId": "15810433344251984001", "status": "completed", "hostName": "host1.marklogic.com", "backupPath": "/space/backup/20150807-1356535579770", "incrementalBackup": false, "journalArchiving": false }, { "forestName": "Security", "forestId": "14856907692299796171", "status": "completed", "hostName": "host1.marklogic.com", "backupPath": "/space/backup/20150807-1356535579770", "incrementalBackup": false, "journalArchiving": false }, { "forestName": "Schemas", "forestId": "18265087540925870633", "status": "completed", "hostName": "host1.marklogic.com", "backupPath": "/space/backup/20150807-1356535579770", "incrementalBackup": false, "journalArchiving": false }, { "forestName": "Triggers", "forestId": "16709030055805263427", "status": "completed", "hostName": "host1.marklogic.com", "backupPath": "/space/backup/20150807-1356535579770", "incrementalBackup": false, "journalArchiving": false } ] }
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.