admin.databaseDeleteBackupById( config as element(configuration), database-id as (Number|String), backup-id as (Number|String)[] ) as element(configuration)
This function deletes a specific database backup, identified by the backup ID.
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
to delete, found by XPath to the backup location(for example,
//db:backup-id/ ).
|
http://marklogic.com/xdmp/privileges/admin/database
http://marklogic.com/xdmp/privileges/admin/database/backup
http://marklogic.com/xdmp/privileges/admin/database/backup/{id}
const admin = require('/MarkLogic/admin.xqy'); var db = "http://marklogic.com/xdmp/database"; var backupIds = admin.databaseGetBackups( admin.getConfiguration(), xdmp.database("Documents"))//db.backupId/fn.data() admin.databaseDeleteBackupById(admin.getConfiguration(), xdmp.database("Documents"), backupIds) //deletes the database backups by ID -- use admin.saveConfiguration //to save the changes to the configuration or pass the configuration //to other Admin API functions to make other changes.