Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ableasdale/1ab92500379fe6c3c983fee001a365c5 to your computer and use it in GitHub Desktop.
Save ableasdale/1ab92500379fe6c3c983fee001a365c5 to your computer and use it in GitHub Desktop.
MarkLogic: get the most recently completed incremental backup for a given database
xquery version "1.0-ml";
declare namespace fs = "http://marklogic.com/xdmp/status/forest";
declare variable $DATABASE as xs:string := xdmp:get-request-field("db")
max(xdmp:forest-status(xdmp:database-forests(xdmp:database($DATABASE)))/fs:last-incr-backup)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment