Loading TOC...

xdmp.databaseRestoreValidate

xdmp.databaseRestoreValidate(
   $forestIDs as String[],
   $pathname as String,
   [$restoreToTime as Date?],
   [$include-replicas as Boolean?],
   [$journal-archiving as Boolean?],
   [$journal-archive-path as String?],
   [$incremental-backup as Boolean?],
   [$incremental-backup-path as String?]
) as Object

Summary

Validates that the specified list of forests can be restored from the backup data directory. Returns a database restore set node.

Parameters
$forestIDs A sequence of forest IDs.
$pathname A backup data directory pathname.
$restoreToTime The date and time to restore the forest data to.
$include-replicas Whether to include replica forests
$journal-archiving Whether to restore from archived journals. Defaults to false.
$journal-archive-path Path to where archived journals are stored. Defaults to the backup data directory.
$incremental-backup Whether to restore using incremental backups. Defaults to false.
$incremental-backup-path Path to where incremental backups are stored. Defaults to the backup data directory.

Required Privileges

This operation requires at least one of the following privileges:

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

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

Example

xdmp.databaseRestoreValidate(
  xdmp.databaseForests(
            xdmp.database("MyDB")),
    // previously backed-up dir
    "/tmp/database_backup"
)
=>
{
    "tagInfo": {
        "version": "8.0-20141119",
        "jobid": "1975326905393827288",
        "startdate": "2014-11-19T10:37:37",
        "enddate": "2014-11-19T10:37:38"
    }
    ,
    "forests": [
        {
            "forestName": "forest1",
            "forestId": "12393306467180079458",
            "forestStatus": "okay",
            "directoryPath": "/tmp/database_backup/20141119-1037377997450",
            "directoryStatus": "okay",
            "action": "restore",
            "incrementalBackup": false,
            "journalArchiving": false
        },
        {
            "forestName": "forest2",
            "forestId": "2102578687500930109",
            "forestStatus": "okay",
            "directoryPath": "/tmp/database_backup/20141119-1037377997450",
            "directoryStatus": "okay",
            "action": "restore",
            "incrementalBackup": false,
            "journalArchiving": false
        }
    ],
    "databases": [
        {
            "databaseName": "MyDB",
            "databaseId": "13433268924640794832",
            "assignmentPolicyName": "bucket",
            "databaseForests": [
                {
                    "forestName": "forest1",
                    "forestId": "12393306467180079458"
                },
                {
                    "forestName": "forest2",
                    "forestId": "2102578687500930109"
                }
            ]
        }
    ]
}

Comments

    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy