MarkLogic 12 EA 1 Product Documentation
admin.databaseBackupGetEnabled

admin.databaseBackupGetEnabled(
   config as element(configuration),
   database-id as (Number|String),
   backup-id as (Number|String)
) as Boolean

Summary

This function returns true or false to indicate whether a specific backup is enabled for a database.

Parameters
config A configuration specification, typically as returned from one of the Admin module functions.
database-id The ID for the database (for example, xdmp.database("myDatabase")).
backup-id The ID of the backup, found by XPath to the backup location (for example, //db:backup-id/).

Example



  let admin = require("/MarkLogic/admin.xqy")
  let backupIds = fn.head(admin.databaseGetBackups(
    admin.getConfiguration(), xdmp.database("Documents"))).xpath("db:backup-id/fn:data()", {"db": "http://marklogic.com/xdmp/database"})
  admin.databaseBackupGetEnabled(admin.getConfiguration(), xdmp.database("Documents"), backupIds)
    
Powered by MarkLogic Server | Terms of Use | Privacy Policy