
admin:database-delete-backup-by-id( $config as element(configuration), $database-id as xs:unsignedLong, $backup-id as xs:unsignedLong* ) as element(configuration)
This function deletes a specific scheduled backup configuration, 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 configuration
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}
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
declare namespace db = "http://marklogic.com/xdmp/database";
let $backup-ids := admin:database-get-backups(
admin:get-configuration(), xdmp:database("Documents"))//db:backup-id/fn:data()
return
admin:database-delete-backup-by-id(admin:get-configuration(),
xdmp:database("Documents"), $backup-ids)
(: deletes the database backups by ID -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)