Loading TOC...

admin.databaseHourlyBackup

admin.databaseHourlyBackup(
   backup-dir as String,
   backup-period as Number,
   start-minute as xs.nonNegativeInteger,
   max-backups as (Number|String),
   backup-security-db as Boolean,
   backup-schemas-db as Boolean,
   backup-triggers-db as Boolean,
   [include-replicas as Boolean],
   [journal-archiving as Boolean?],
   [journal-archive-path as String?],
   [lag-limit as (Number|String)?]
) as element(db.databaseBackup)

Summary

This function constructs an hourly scheduled database backup specification.

Parameters
backup-dir The directory to save the backup.
backup-period The number of hours to elapse between each backup.
start-minute The number of minutes after the hour to start the backup. Note that this setting does not add to the backup period value.
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. This setting does not apply for incremental 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

  
  const admin = require('/MarkLogic/admin.xqy');
  const config = admin.getConfiguration()
    admin.databaseHourlyBackup("/backupDir", 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. 
   

Example

  
  const admin = require('/MarkLogic/admin.xqy');
  const config = admin.getConfiguration()
    admin.databaseHourlyBackup("/backupDir", 2,
      30, 10, "true", "true", "true","false","true",null,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 iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.