
admin:database-hourly-backup( $backup-dir as xs:string, $backup-period as xs:positiveInteger, $start-minute as xs:nonNegativeInteger, $max-backups as xs:unsignedLong, $backup-security-db as xs:boolean, $backup-schemas-db as xs:boolean, $backup-triggers-db as xs:boolean, [$include-replicas as xs:boolean], [$journal-archiving as xs:boolean?], [$journal-archive-path as xs:string?], [$lag-limit as xs:unsignedLong?] ) as element(db:database-backup)
This function constructs an hourly scheduled database backup specification.
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
return
admin:database-hourly-backup("/backup-dir", 2,
30, 10, true(), true(), true())
(: Returns the hourly database backup specification. For example, if the current
time is 2:15pm, the backup will run at 4:30pm, 6:30pm, 8:30pm, and so on. :)
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
return
admin:database-hourly-backup("/backup-dir", 2,
30, 10, true(), true(), true(),false(),true(),(),500)
(: Returns the hourly database backup specification. For example, if the current
time is 2:15pm, the backup will run at 4:30pm, 6:30pm, 8:30pm, and so on. :)
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.