xdmp:database-backup-status( $jobid as xs:unsignedLong*, [$hostid as xs:unsignedLong*] ) as element()*
Checks the status of the outstanding backup job with the specified
job ID. Returns a database backup status
node defined in the job-status.xsd
schema.
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 a complex element with the following element children:
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
let $b := xdmp:eval('xdmp:database-backup( xdmp:database-forests(xdmp:database("Documents")), "/space/backup")') return xdmp:database-backup-status($b) => the backup status for the backup initiated in the xdmp:eval <job:job-status xsi:schemaLocation="http://marklogic.com/xdmp/job-status job-status.xsd" xmlns:job="http://marklogic.com/xdmp/job-status" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <job:job-id>9457138413104448788</job:job-id> <job:status>in-progress</job:status> <job:forest> <job:forest-name>Documents</job:forest-name> <job:forest-id>15810433344251984001</job:forest-id> <job:status>in-progress</job:status> <job:host-name>host1.marklogic.com</job:host-name> <job:backup-path>/space/backup/20150807-1353536714460</job:backup-path> <job:incremental-backup>false</job:incremental-backup> <job:journal-archiving>false</job:journal-archiving> </job:forest> </job:job-status>
let $b := xdmp:eval('xdmp:database-incremental-backup( xdmp:database-forests(xdmp:database("Documents")), "/space/backup","/space/incrbackup")') return xdmp:database-backup-status($b) => the backup status for the incremental backup initiated in the xdmp:eval <job:job-status xsi:schemaLocation="http://marklogic.com/xdmp/job-status job-status.xsd" xmlns:job="http://marklogic.com/xdmp/job-status" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <job:job-id>11676716897085375508</job:job-id> <job:status>in-progress</job:status> <job:forest> <job:forest-name>Documents</job:forest-name> <job:forest-id>15810433344251984001</job:forest-id> <job:status>in-progress</job:status> <job:host-name>host1.marklogic.com</job:host-name> <job:backup-path>/space/backup/20150807-1353536714460</job:backup-path> <job:incremental-backup>true</job:incremental-backup> <job:incremental-backup-path>/space/incrbackup/20150807-1353536714460/20150807/1355436552150</job:incremental-backup-path> <job:journal-archiving>false</job:journal-archiving> </job:forest> </job:job-status>
xdmp:database-backup-status((), xdmp:hosts()) => <job:job-status xsi:schemaLocation="http://marklogic.com/xdmp/job-status job-status.xsd" xmlns:job="http://marklogic.com/xdmp/job-status" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <job:job-id>7138588173658949103</job:job-id> <job:status>completed</job:status> <job:forest> <job:forest-name>Documents</job:forest-name> <job:forest-id>15810433344251984001</job:forest-id> <job:status>completed</job:status> <job:host-name>host1.marklogic.com</job:host-name> <job:backup-path>/space/backup/20150807-1356535579770</job:backup-path> <job:incremental-backup>false</job:incremental-backup> <job:journal-archiving>false</job:journal-archiving> </job:forest> <job:forest> <job:forest-name>Security</job:forest-name> <job:forest-id>14856907692299796171</job:forest-id> <job:status>completed</job:status> <job:host-name>host1.marklogic.com</job:host-name> <job:backup-path>/space/backup/20150807-1356535579770</job:backup-path> <job:incremental-backup>false</job:incremental-backup> <job:journal-archiving>false</job:journal-archiving> </job:forest> <job:forest> <job:forest-name>Schemas</job:forest-name> <job:forest-id>18265087540925870633</job:forest-id> <job:status>completed</job:status> <job:host-name>host1.marklogic.com</job:host-name> <job:backup-path>/space/backup/20150807-1356535579770</job:backup-path> <job:incremental-backup>false</job:incremental-backup> <job:journal-archiving>false</job:journal-archiving> </job:forest> <job:forest> <job:forest-name>Triggers</job:forest-name> <job:forest-id>16709030055805263427</job:forest-id> <job:status>completed</job:status> <job:host-name>host1.marklogic.com</job:host-name> <job:backup-path>/space/backup/20150807-1356535579770</job:backup-path> <job:incremental-backup>false</job:incremental-backup> <job:journal-archiving>false</job:journal-archiving> </job:forest> </job:job-status>
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.