<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/xdmp.databaseBackupStatus.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>xdmp.databaseBackupStatus</api:function-name><api:suggest>xdmp.databasebackupstatus</api:suggest><api:suggest>xdmp</api:suggest><api:suggest>databasebackupstatus</api:suggest><api:function-link mode="xquery" fullname="xdmp:database-backup-status">/apidoc/8.0/xdmp:database-backup-status.xml</api:function-link><api:function mode="javascript" name="databaseBackupStatus" type="builtin" lib="xdmp" category="AdminBuiltins" hidden="false" bucket="MarkLogic Built-In Functions" prefix="xdmp" namespace="http://marklogic.com/xdmp" fullname="xdmp.databaseBackupStatus"><api:summary>
  Checks the status of the outstanding backup job with the specified
  job ID. Returns a database backup status <span class="javascript" xmlns="http://www.w3.org/1999/xhtml"> as a JSON</span>
  node. 
  If you don't specify a job ID for the first parameter, status for all currently 
  running backup jobs will be returned. 
</api:summary><api:params><api:param name="jobid" type="xs:unsignedLong*"><api:param-description>
    A backup job ID.
  </api:param-description><api:param-name>jobid</api:param-name><api:param-type>String[]</api:param-type></api:param><api:param name="hostid" type="xs:unsignedLong*" optional="true"><api:param-description>
    The ID of the host that the backup was started on.
  </api:param-description><api:param-name>hostid</api:param-name><api:param-type>String[]</api:param-type></api:param></api:params><api:return class="javascript">ObjectNode*</api:return><api:privilege>
  <p xmlns="http://www.w3.org/1999/xhtml"><code>http://marklogic.com/xdmp/privileges/xdmp-database-backup-status</code></p>
</api:privilege><api:usage schema="job-status.xsd" element-name="job-status"> 
  <p xmlns="http://www.w3.org/1999/xhtml">If the host coordinating the backup restarts, information about the backup 
  will be lost. </p>
<api:schema-info><api:element><api:element-name>forest</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">
	      The forest being backed up.  There is one forest element for each
	      forest in the backup.
      </xs:documentation></api:element-description><api:element><api:element-name>forest-name</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">
  	The name of the forest.
      </xs:documentation></api:element-description></api:element><api:element><api:element-name>forest-id</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">
  	The forest ID.
      </xs:documentation></api:element-description></api:element><api:element><api:element-name>status</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">
	      The status of the forest backup.  The status is one of: "queued", 
	      "in-progress", "failed", "canceled", completed", or "unknown".
      </xs:documentation></api:element-description></api:element><api:element><api:element-name>restore-to-time</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">
        The date and time this backup was created.
      </xs:documentation></api:element-description></api:element><api:element><api:element-name>journal-archiving</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">
	Is journal archiving enabled for a full backup?
      </xs:documentation></api:element-description></api:element><api:element><api:element-name>journal-archive-path</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">
	Path to the associated journal archive location.
      </xs:documentation></api:element-description></api:element><api:element><api:element-name>safe-restore-to-time</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">
        The date and time this backup was created.
      </xs:documentation></api:element-description></api:element><api:element><api:element-name>journal-archive-lag-limit</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">
  	Number of seconds the archived journal can lag the active journal.
      </xs:documentation></api:element-description></api:element><api:element><api:element-name>host-name</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">
        Hostname where this forest is backup.
      </xs:documentation></api:element-description></api:element><api:element><api:element-name>backup-path</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">
        Path to the backup location.
      </xs:documentation></api:element-description></api:element><api:element><api:element-name>incremental-backup-path</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">
        Path to the backup location.
      </xs:documentation></api:element-description></api:element></api:element><api:element><api:element-name>job-id</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">
        The job ID.
      </xs:documentation></api:element-description></api:element><api:element><api:element-name>status</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">
	      The status of the forest backup.  The status is one of: "queued", 
	      "in-progress", "failed", "canceled", completed", or "unknown".
      </xs:documentation></api:element-description></api:element></api:schema-info></api:usage><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
xdmp.databaseBackupStatus(
    xdmp.databaseBackup(
        xdmp.databaseForests(xdmp.database("Documents")),
        "/space/backup"
    )
)
=&gt;
{
  "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
      }
   ]
}
</pre>
</api:example><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
xdmp.databaseBackupStatus([], xdmp.hosts())
=&gt;
{
  "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
    }
  ]
}
</pre>
</api:example></api:function></api:function-page>