admin:forest-backup-get-enabled( $config as element(configuration), $forest-id as xs:unsignedLong, $backup-id as xs:unsignedLong ) as xs: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. |
xquery version "1.0-ml"; import module namespace admin = "http://marklogic.com/xdmp/admin" at "/MarkLogic/admin.xqy"; lmport module namespace admin = "http://marklogic.com/xdmp/admin" at "/MarkLogic/admin.xqy"; declare namespace fa = "http://marklogic.com/xdmp/assignments"; let $config := admin:get-configuration() let $forest := xdmp:forest("Documents") let $backup-ids := admin:forest-get-backups( admin:get-configuration(), xdmp:forest("Documents"))//fa:backup-id/fn:data() return admin:forest-backup-get-enabled($config, $forest, $backup-ids) => true (: returns the backup enabled setting for the forest - true or false :)