<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/xdmp.databaseBackupValidate.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>xdmp.databaseBackupValidate</api:function-name><api:suggest>xdmp.databasebackupvalidate</api:suggest><api:suggest>xdmp</api:suggest><api:suggest>databasebackupvalidate</api:suggest><api:function-link mode="xquery" fullname="xdmp:database-backup-validate">/apidoc/8.0/xdmp:database-backup-validate.xml</api:function-link><api:function mode="javascript" name="databaseBackupValidate" type="builtin" lib="xdmp" category="AdminBuiltins" hidden="false" bucket="MarkLogic Built-In Functions" prefix="xdmp" namespace="http://marklogic.com/xdmp" fullname="xdmp.databaseBackupValidate"><api:summary>
  Validates that the specified list of forests can be backed up to the
  backup data directory.  Optionally verifies that the list of forests
  can enable journal archiving to the journal archive directory with the 
  specified lag limit. Returns a database backup set node.
</api:summary><api:params><api:param name="forestIDs" type="xs:unsignedLong*"><api:param-description>
    A sequence of forest IDs.
  </api:param-description><api:param-name>forestIDs</api:param-name><api:param-type>String[]</api:param-type></api:param><api:param name="pathname" type="xs:string"><api:param-description>
    A backup data directory pathname.
  </api:param-description><api:param-name>pathname</api:param-name><api:param-type>String</api:param-type></api:param><api:param name="include-replicas" type="xs:boolean?" optional="true"><api:param-description>
    Whether or not to include replica forests
  </api:param-description><api:param-name>include-replicas</api:param-name><api:param-type>Boolean?</api:param-type></api:param><api:param name="journal-archiving" type="xs:boolean?" optional="true"><api:param-description>
    Whether or not to enable journal archiving
  </api:param-description><api:param-name>journal-archiving</api:param-name><api:param-type>Boolean?</api:param-type></api:param><api:param name="journal-archive-path" type="xs:string?" optional="true"><api:param-description>
    Path to where archived journals are stored. Defaults to the backup data
    directory.
  </api:param-description><api:param-name>journal-archive-path</api:param-name><api:param-type>String?</api:param-type></api:param><api:param name="lag-limit" type="xs:unsignedLong?" optional="true"><api:param-description>
    Maximum difference in seconds that the archived journal can lag behind its
    forest's active journal. Defaults to 15.
  </api:param-description><api:param-name>lag-limit</api:param-name><api:param-type>String?</api:param-type></api:param></api:params><api:return class="javascript">Object</api:return><api:privilege>
  <p xmlns="http://www.w3.org/1999/xhtml"><code>http://marklogic.com/xdmp/privileges/xdmp-database-backup-validate</code></p>
</api:privilege><api:usage schema="backup-plan.xsd" element-name="forest" camel-case="true"> <api:schema-info><api:element><api:element-name>forestName</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>forestId</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">
        The ID of the forest.
       </xs:documentation></api:element-description></api:element><api:element><api:element-name>forestStatus</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">
        The status of the forest.
       </xs:documentation></api:element-description></api:element><api:element><api:element-name>directoryPath</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">
        The directory path.
       </xs:documentation></api:element-description></api:element><api:element><api:element-name>directoryStatus</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">
        The status of the directory where the backup is located.
       </xs:documentation></api:element-description></api:element><api:element><api:element-name>action</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">
       Action to be taken by the backup plan. The action can be "backup", 
	   "incremental-backup" or "restore" depending on the plan.
       </xs:documentation></api:element-description></api:element><api:element><api:element-name>restoreToTime</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">
       Restore the back up to this time.
       </xs:documentation></api:element-description></api:element><api:element><api:element-name>journalArchiving</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">
       Whether journal archiving is enabled (true or false). Default is false.
       </xs:documentation></api:element-description></api:element><api:element><api:element-name>journalArchivePath</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">
       Path to the location of the journal archive.
       </xs:documentation></api:element-description></api:element><api:element><api:element-name>journalArchivePathStatus</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">
       Status of the journal archive path.
       </xs:documentation></api:element-description></api:element><api:element><api:element-name>journalsStatus</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">
       Status of the journals.
       </xs:documentation></api:element-description></api:element><api:element><api:element-name>forestUpdate</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">
       Forest update.
       </xs:documentation></api:element-description></api:element><api:element><api:element-name>forestUpdateStatus</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">
       Status of the forest update.
       </xs:documentation></api:element-description></api:element><api:element><api:element-name>journalArchiveLagLimit</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">
       Integer describing the journal archive lag limit.
       </xs:documentation></api:element-description></api:element><api:element><api:element-name>journalArchiveLagLimitStatus</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">
       Status of the journal archive lag limit.
       </xs:documentation></api:element-description></api:element><api:element><api:element-name>mergeTimestampStatus</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">
       Status of the merge timestamp.
       </xs:documentation></api:element-description></api:element><api:element><api:element-name>incrementalBackup</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">
        Whether an incremental back up occurred (true or false). Default is false.
       </xs:documentation></api:element-description></api:element><api:element><api:element-name>incrementalBackupPath</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">
       Path to the location of the incremental back up.
       </xs:documentation></api:element-description></api:element><api:element><api:element-name>incrementalBackupPathStatus</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">
       Status of the incremental back up path.
       </xs:documentation></api:element-description></api:element><api:element><api:element-name>fullBackupStatus</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">
       Status of the full backup.
       </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.databaseBackupValidate(xdmp.databaseForests(xdmp.database("Documents")),
    "/space/backups", false, true);
=&gt; 
{
 "journalArchiveForestSelectionStatus": "okay",
 "forests": [
   {
    "forestName": "Documents",
    "forestId": "18080252238750949856",
    "forestStatus": "okay",
    "directoryPath": "/space/backups",
    "directoryStatus": "okay",
    "action": "backup",
    "incrementalBackup": "false",
    "journalArchiving": "true",
    "forestUpdate": "all",
    "forestUpdateStatus": "okay",
    "journalArchivePath": "/space/backups",
    "journalArchivePathStatus": "okay",
    "journalArchiveLagLimit": "15",
    "journalArchiveLagLimitStatus": "okay"
   }
  ,
   {
    "forestName": "test",
    "forestId": "15032873714652460194",
    "forestStatus": "okay",
    "directoryPath": "/space/backups",
    "directoryStatus": "okay",
    "action": "backup",
    "incrementalBackup": "false",
    "journalArchiving": "true",
    "forestUpdate": "all",
    "forestUpdateStatus": "okay",
    "journalArchivePath": "/space/backups",
    "journalArchivePathStatus": "okay",
    "journalArchiveLagLimit": "15",
    "journalArchiveLagLimitStatus": "okay"
   } ]
}

</pre></api:example></api:function></api:function-page>