Daily/ Weekly/ Monthly Schedules

From The Open Source Backup Wiki (Amanda, MySQL Backup, BackupPC)
Jump to navigationJump to search
  • The mysql-zrm-scheduler utility can schedule daily, weekly and monthly backup runs globally for all the backup set,or, for a specific backup set.
  • Once scheduled, the backup runs happen largely automatically, the exceptions being daily backups that can be delayed or deferred completely .
  • Scheduled backup runs can be deleted .
  • You can query the scheduled backup runs to see what they cover.

Schedule Daily/Weekly/Monthly Backups

mysql-zrm-scheduler --add|--query|--delete|--now
                   [--start <start time>]
                   [--interval <interval>]
                   [--backup-level <0|1>]
                   [--backup-set <backupset name>]
                   [--help]
  • At the scheduled time, this tool will execute the pre-scheduler plugin (optional) to determine the system load.
  • If --now option is specified, the mysql-zrm-scheduler tool will call mysql-zrm immediately.
  • Its main parameters related to scheduling are:
--start <start time>
start time for the backup run in HH:MM format. Default value is 00:00 for monthly, 02:00 for weekly and 03:00 for daily interval.
--day-of-week <day of week>
Single number from 0-6 (0=Sunday, 6=Saturday), or a range of two numbers separated with a hyphen. This value is used with weekly interval. Example: 1, to start on Monday 0-2, to start on Sunday, Monday and Tuesday. Default 0 (Sunday).
--day-of-month <day of month>
Single number from 1-31 or a range of two numbers separated with a hyphen. This value is used with monthly interval. Example: 2, to start on second day of the month. 10-12, to start on the 10th, 11th and 12th day of the month. Default 1 (first day of the month).
--interval <interval>
Valid inputs are daily, weekly or monthly.
--now
Does MySQL backup now.

Examples

To schedule a daily mysql-zrm run to start at 1:35 pm:

# mysql-zrm-scheduler --add --interval daily --start 13:35

To schedule a weekly mysql-zrm run to start on Tuesday and Wednesday:

# mysql-zrm-scheduler --add --interval weekly --day-of-week 2-3

To schedule a monthly mysql-zrm run to start on the tenth day of each month:

# mysql-zrm-scheduler --add --interval monthly --day-of-month 10

To delete a daily mysql-zrm run which has specific start time from schedule:

# mysql-zrm-scheduler --delete --interval daily --start 13:35

To delete the weekly mysql-zrm run from schedule:

# mysql-zrm-scheduler --delete --interval weekly --day-of-week 2-3

Other languages: [[::Daily/ Weekly/ Monthly Schedules|English]] {{#ifexist: {{#if: | | {{#if: | :}}Daily/ Weekly/ Monthly Schedules}}/Fr |  • {{#if: |français| [[::Daily/ Weekly/ Monthly Schedules/Fr|français]]}}|}}

{{#ifexist: {{#if: | | {{#if: | :}}Daily/ Weekly/ Monthly Schedules}}/Zh-cn |  • {{#if: |中文(中国大陆)‎| [[::Daily/ Weekly/ Monthly Schedules/Zh-cn|中文(中国大陆)‎]]}}|}}