MarkLogic Server 11.0 Product Documentation
xdmp.databaseBackupStatus

xdmp.databaseBackupStatus(
   jobid as (Number|String)[],
   [hostid as (Number|String)[]]
) as ObjectNode*

Summary

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.

Required Privileges

http://marklogic.com/xdmp/privileges/xdmp-database-backup-status

Usage Notes

If the host coordinating the backup restarts, information about the backup will be lost.

The structure of the data returned is as follows:

forest

The forest being backed up. There is one forest element for each forest in the backup.

This is an object with the following properties:

forest-name

The name of the forest.

forest-id

The forest ID.

status

The status of the forest backup. The status is one of: "queued", "in-progress", "failed", "canceled", "completed", "finishing", or "unknown".

restore-to-time

The date and time this backup was created.

journal-archiving

Is journal archiving enabled for a full backup?

journal-archive-path

Path to the associated journal archive location.

safe-restore-to-time

The date and time this backup was created.

journal-archive-lag-limit

Number of seconds the archived journal can lag the active journal.

host-name

Hostname where this forest is backup.

backup-path

Path to the backup location.

incremental-backup-path

Path to the backup location.

job-id

The job ID.

status

The status of the forest backup. The status is one of: "queued", "in-progress", "failed", "canceled", "completed", "finishing", or "unknown".

Example

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
      }
   ]
}

Example

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
    }
  ]
}
Powered by MarkLogic Server | Terms of Use | Privacy Policy