MarkLogic 9 Product Documentation
admin:database-weekly-backup

admin:database-weekly-backup(
   $backup-dir as xs:string,
   $backup-period as xs:positiveInteger,
   $days as xs:string+,
   $start-time as xs:time,
   $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 weekly scheduled backup specification.

Parameters
backup-dir The directory where the backup will be saved to.
backup-period How many weeks between each backup.
days The day(s) of the week. Must be a sequence of zero or more of monday, tuesday, wednesday, thursday, friday, saturday, sunday.
start-time A time for the scheduled backup to start.
max-backups The maximum number of backups to keep in the backup directory.
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";

  admin:database-weekly-backup("/backup-dir", 2, "monday",
        xs:time("09:45:00"),10,true(),true(),true())
  (: returns the weekly backup specification :)
  

Example


  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin"
      at "/MarkLogic/admin.xqy";

  admin:database-weekly-backup("/backup-dir", 2, "monday",
        xs:time("09:45:00"),10,true(),true(),true(),false(),true(),"",500)
  (: returns the weekly backup specification :)
  
Powered by MarkLogic Server | Terms of Use | Privacy Policy