Loading TOC...


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


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

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/).


  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)

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