Scheduling-Backups-In-Zimbra

Scheduling Backups in Zimbra

   KB 20503        Last updated on 2015-07-12  




0.00
(0 votes)

Below are the example steps to schedule backups in zimbra

Help Manual:

zmschedulebackup -h

Schedule regular backups

Usage: zmschedulebackup [-q|-D|-s|-F| [{-A|-R} [zmbackup options] { <backup-type> } { <backup-schedule> } ] ]

 -q: query (default command) - prints existing schedule
 -s: save schedule to text format for easy restoration
 -F: flush - remove current schedule (cancel all scheduled backups)
 -A: append - adds specified backup to current schedule
 -R: replace - replace current schedule with specified schedule
 -D: default - replace current schedule with DEFAULT schedule
 Options that will be passed to zmbackup:
 -n: no compression - Backs up blobs as individual files rather than in zip files.
 -z: compress - Backs up blobs in compressed zip files.  Ignored if --zipStore is specified.
 --zipStore: - Backup up blobs in zip files without compression.
 -t: target - backup target location (default is /opt/zimbra/backup)
 -a: account - account specific (default is all)
 --mail-report: Send an email report to the admin user.
 --server: server - Mail server hostname. Default is localhost.
 --sync: Runs full backup synchronously.
 --excludeBlobs: Exclude blobs from full backup; if unspecified, use server config
 --includeBlobs: Include blobs in full backup; if unspecified, use server config
 --excludeHsmBlobs: Exclude blobs on HSM volumes from full backup; if unspecified, use server config
 --includeHsmBlobs: Include blobs on HSM volumes in full backup; if unspecified, use server config
 --excludeSearchIndex: Exclude search index from full backup; if unspecified, use server config
 --includeSearchIndex: Include search index in full backup; if unspecified, use server config
 Backup Mode (Standard or Auto-Grouped) comes from global/server config zimbraBackupMode
 Cron schedule:
       backup-type: <i|f|d arg>
       i: incremental backup (not needed in Auto-Grouped backup mode)
       f: full backup
       d <arg>: delete backups. <arg> is n{d|m|y}
       backup-schedule: crontab style time specifier, QUOTED.  See crontab(5)
               Fields are:
                       minute         0-59
                       hour           0-23
                       day of month   1-31
                       month          1-12
                       day of week    0-7 (0 or 7 is Sun, or use names)
       Default schedule in Standard backup mode is:
       f    0 1 * * 6
       i    0 1 * * 0-5
       d 1m 0 0 * * *
       Default schedule in Auto-Grouped backup mode is:
       f    0 1 * * 0-6
       d 1m 0 0 * * *


Examples:

To Verify Backup Schedules:

[zimbra@zcs ~]$ zmschedulebackup -q
Current Schedule:
f 0 1 * * 6 -a all --mail-report
i 0 1 * * 0-5 --mail-report
d 1m 0 0 * * * --mail-report
[zimbra@zcs ~]$ crontab -l |grep -i backup
# Backups
# BACKUP BEGIN
0 1 * * 6 /opt/zimbra/bin/zmbackup -f -a all --mail-report
0 1 * * 0-5 /opt/zimbra/bin/zmbackup -i --mail-report
0 0 * * * /opt/zimbra/bin/zmbackup -del 1m --mail-report
# BACKUP END
[zimbra@zcs ~]$

To Configure Default Backup Schedules:

[zimbra@zcs ~]$ zmschedulebackup -D
Default schedule set
Current Schedule:
f 0 1 * * 6 -a all --mail-report
i 0 1 * * 0-5 --mail-report
d 1m 0 0 * * * --mail-report
[zimbra@zcs ~]$

To Configure Customized Backup Schedules:

[zimbra@zcs ~]$ zmschedulebackup -R f "0 1 * * 6" --mail-report i "0 1 * * 0-5" --mail-report d  14d "0 0 * * *" --mail-report
Schedule replaced
Current Schedule:
f 0 1 * * 6 -a all --mail-report
i 0 1 * * 0-5 --mail-report
d 14d 0 0 * * * --mail-report
[zimbra@zcs ~]$ crontab -l |grep -i backup
# Backups
# BACKUP BEGIN
0 1 * * 6 /opt/zimbra/bin/zmbackup -f -a all --mail-report
0 1 * * 0-5 /opt/zimbra/bin/zmbackup -i --mail-report
0 0 * * * /opt/zimbra/bin/zmbackup -del 14d --mail-report
# BACKUP END
[zimbra@zcs ~]$
Verified Against: Zimbra Collaboration 8.0, 7.0 Date Created: 04/16/2014
Article ID: https://wiki.zimbra.com/index.php?title=Scheduling-Backups-In-Zimbra Date Modified: 2015-07-12



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »


Jump to: navigation, search