Loading TOC...

admin:database-minutely-backup

admin:database-minutely-backup(
   backup-dir as xs:string,
   backup-period as xs:positiveInteger,
   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)

Summary

This function constructs a scheduled database backup specification on a number-of-minutes basis.

Parameters
backup-dir The directory to save the backup.
backup-period The number of minutes to elapse between each backup.
max-backups The maximum number of backups to keep. When you reach the specified maximum number of backups, the next backup will delete the oldest backup. Specify 0 to keep an unlimited number of backups.
backup-security-db Whether to backup the security database alongside the current backup.
backup-schemas-db Whether to backup the schemas database alongside the current backup.
backup-triggers-db Whether to backup the triggers database alongside the current backup.
include-replicas If set to false, do not include the replicas in the backup. The default is true, which means to include all replicas in the backup.
journal-archiving Whether or not to enable journal archiving. Defaults to false.
journal-archive-path Path for where archived journals are stored. Defaults to the backup data directory.
lag-limit Maximum difference in seconds that the archived journal can lag behind its forest's active journal. Defaults to 900.

Example


  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-minutely-backup("/backup-dir", 45,
      10, true(), true(), true())

  (: Returns the minutely database backup specification. :)
   

Example


  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-minutely-backup("/backup-dir", 45,
      10, true(), true(), true(),false(),true(),(),500)

  (: Returns the minutely database backup specification. :)
   

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