Loading TOC...

MarkLogic 10 Product Documentation
xdmp.databaseBackupValidate

xdmp.databaseBackupValidate(
   forestIDs as (Number|String)[],
   pathname as String,
   [include-replicas as Boolean?],
   [journal-archiving as Boolean?],
   [journal-archive-path as String?],
   [lag-limit as (Number|String)?]
) as Object

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:

forestName

The name of the forest.

forestId

The ID of the forest.

forestStatus

The status of the forest.

directoryPath

The directory path.

directoryStatus

The status of the directory where the backup is located.

backupTime

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.

restoreToTime

Restore the back up to this time.

journalArchiving

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

journalArchivePath

Path to the location of the journal archive.

journalArchivePathStatus

Status of the journal archive path.

journalsStatus

Status of the journals.

forestUpdate

Forest update.

forestUpdateStatus

Status of the forest update.

journalArchiveLagLimit

Integer describing the journal archive lag limit.

journalArchiveLagLimitStatus

Status of the journal archive lag limit.

mergeTimestampStatus

Status of the merge timestamp.

incrementalBackup

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

incrementalBackupPath

Path to the location of the incremental back up.

incrementalBackupPathStatus

Status of the incremental back up path.

fullBackupStatus

Status of the full backup.

backupForests

This is an object with the following properties:

backupForest

This is an object with the following properties:

forestName

The name of the forest.

directoryStatus

The status of the directory where the backup is located.

Example

xdmp.databaseBackupValidate(xdmp.databaseForests(xdmp.database("Documents")),
    "/space/backups", false, true);
=>
{
 "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"
   } ]
}

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.