Loading TOC...

xdmp:database-backup-purge

xdmp:database-backup-purge(
   $dir as xs:string,
   $keep-num-backups as xs:unsignedInt,
   [$incremental-dir as xs:string]
) as empty-sequence()

Summary

Purge old backups from a directory.

Parameters
dir The directory under which to look for backups.
keep-num-backups The maximum number of old backups to keep.
incremental-dir The directory under which to look for incremental backups. Defaults to the backup data directory.

Required Privileges

This operation requires at least one of the following privileges:

http://marklogic.com/xdmp/privileges/xdmp-database-backup-purge

http://marklogic.com/xdmp/privileges/xdmp-database-backup-purge/database/{id}

Example

xdmp:database-backup-purge("/my/backupdir/", 10, "/my/incrementaldir")
=>
()

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