
admin.databaseBackupSetEnabled( config as element(configuration), database-id as (Number|String), backup-id as (Number|String), enabled as Boolean ) as element(configuration)
This function enables database backup for the specified 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/).  | 
	  
| enabled | Sets the database backup to
	enabled. The default is true, which means the database backup
	will take place.  | 
	  
http://marklogic.com/xdmp/privileges/admin/database
http://marklogic.com/xdmp/privileges/admin/database/backup
http://marklogic.com/xdmp/privileges/admin/database/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.databaseBackupSetEnabled(admin.getConfiguration(), xdmp.database("Documents"), backupIds, true)