MarkLogic 10 Product Documentation
xdmp:database-backup-validate

xdmp:database-backup-validate(
   $forestIDs as xs:unsignedLong*,
   $pathname as xs:string,
   [$include-replicas as xs:boolean?],
   [$journal-archiving as xs:boolean?],
   [$journal-archive-path as xs:string?],
   [$lag-limit as xs:unsignedLong?]
) as element()

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.

Parameters
forestIDs A sequence of forest IDs.
pathname A backup data directory pathname.
include-replicas Whether or not to include replica forests
journal-archiving Whether or not to enable journal archiving
journal-archive-path Path to where archived journals are stored. Defaults to the backup data directory.
lag-limit Maximum difference in seconds that the archived journal can lag behind its forest's active journal. Defaults to 15.

Required Privileges

This operation requires at least one of the following privileges:

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

http://marklogic.com/xdmp/privileges/xdmp-database-backup-validate/database/{id}

Usage Notes

The structure of the data returned is as follows:

forest-name

The name of the forest.

forest-id

The ID of the forest.

forest-status

The status of the forest.

directory-path

The directory path.

directory-status

The status of the directory where the backup is located.

backup-time

Backup time extracted from path name.

action

Action to be taken by the backup plan. The action can be "backup", "incremental-backup" or "restore" depending on the plan.

restore-to-time

Restore the back up to this time.

journal-archiving

Whether journal archiving is enabled (true or false). Default is false.

journal-archive-path

Path to the location of the journal archive.

journal-archive-path-status

Status of the journal archive path.

journals-status

Status of the journals.

forest-update

Forest update.

forest-update-status

Status of the forest update.

journal-archive-lag-limit

Integer describing the journal archive lag limit.

journal-archive-lag-limit-status

Status of the journal archive lag limit.

merge-timestamp-status

Status of the merge timestamp.

incremental-backup

Whether an incremental back up occurred (true or false). Default is false.

incremental-backup-path

Path to the location of the incremental back up.

incremental-backup-path-status

Status of the incremental back up path.

full-backup-status

Status of the full backup.

backup-forests

This is a complex element with the following element children:

backup-forest

This is a complex element with the following element children:

forest-name

The name of the forest.

directory-status

The status of the directory where the backup is located.

Example

  xdmp:database-backup-validate((11183608861595735720,898513504988507762),
    "/backups/Data", fn:false(), fn:true())
  =>
<bp:backup-plan
   xsi:schemaLocation="http://marklogic.com/xdmp/backup-plan backup-plan.xsd"
   xmlns:bp="http://marklogic.com/xdmp/backup-plan"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
  <bp:forest>
    <bp:forest-name>Documents</bp:forest-name>
    <bp:forest-id>9157142760003704384</bp:forest-id>
    <bp:forest-status>okay</bp:forest-status>
    <bp:directory-path>/tmp</bp:directory-path>
    <bp:directory-status>okay</bp:directory-status>
    <bp:action>backup</bp:action>
    <bp:journal-archiving>true</bp:journal-archiving>
    <bp:journal-archive-path>/tmp</bp:journal-archive-path>
    <bp:journal-archive-path-status>okay</bp:journal-archive-path-status>
    <bp:journal-archive-lag-limit>15</bp:journal-archive-lag-limit>
    <bp:journal-archive-lag-limit-status>okay</bp:journal-archive-lag-limit-status>
  </bp:forest>
</bp:backup-plan>
Powered by MarkLogic Server | Terms of Use | Privacy Policy