admin.forestBackupGetEnabled( config as element(configuration), forest-id as (Number|String), backup-id as (Number|String) ) as Boolean
This function returns true or false to indicate whether backup is enabled for the specified forest.
Parameters | |
---|---|
config | A configuration specification, typically as returned from one of the Admin module functions. |
forest-id | The ID of the forest.
For example, xdmp:forest("myForest")
specifies the ID for a forest named "myForest". |
backup-id | The ID of the backup. |
let admin = require("/MarkLogic/admin.xqy") let config = admin.getConfiguration() let forest = xdmp.forest("Documents") let backupIds = fn.head(admin.forestGetBackups( admin.getConfiguration(), xdmp.forest("Documents"))).xpath("fa:backup-id/fn:data()", {"fa": "http://marklogic.com/xdmp/assignments"}) admin.forestBackupGetEnabled(config, forest, backupIds)
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.