ZCS Administrator's Guide Network Edition 6.0.8
Table of Contents Previous Next Index


Backup and Restore : Backing up using the Standard Method

Backing up using the Standard Method
When you initiate a backup, you can issue the command from the same server being backed up, run the command remotely and specify the target server on the command line, or use the administration console to start a backup session.
Scheduling Backups
When ZCS was installed, the backup schedule for the standard method of full and incremental backups was added to the crontab. Under the default schedule, the full backup is scheduled for 1:00 a.m., every Saturday. The incremental backups are scheduled for 1:00 a.m., Sunday through Friday.
By default, backups older than a month are deleted every night at 12 a.m.
You can change the backup schedule using the zmschedulebackup command.
Specify the fields as follows, separate each field with a blank space:
minute — 0 through 59
hour — 0 through 23
day of month — 1 through 31
month — 1 through 12
day of week — 0 through 7 (0 or 7 is Sunday, or use names)
Type an asterisk (*) in the fields you are not using.
Example of zmschedulebackup options
Replace the existing full backup, incremental backup and delete backup schedule. When you use -R, the complete backup schedule is replaced. If you use this command, remember to set the delete schedule, if you want backup sessions to be scheduled for automatic deletion. This example replaces the existing schedule to have full backups run on Sunday at 1 a.m., incremental backups to run Monday through Saturday at 1 a.m., and old backups deleted at 12:00 a.m. every day.
zmschedulebackup -R f “0 1 * * 7” i “0 1 * * 1-6” d “0 0 * * *”
zmschedulebackup -A f “0 1 * * 4”
zmschedulebackup -q
Save the schedule command to a text file. This would allow you to easily recreate the same schedule after reinstall or upgrade
zmschedulebackup -s
Note: If you change the default schedule and want to return to it, enter the command zmschedulebackup -D.
The default backup schedule looks like this in the cron table:
BACKUP BEGIN :
Read as follows:
0 1 * * * 6 /opt/zimbra/bin/zmbackup -f - all means that the full backup runs on 1 a.m. on Saturdays.
0 1* * 0-5 /opt/zimbra/bin/zmbackup -i means that an incremental backup runs at 1 a.m. from Sunday through Friday.
0 0 * * * /opt/zimbra/bin/zmbackup -del 1m means that backup sessions are deleted at midnight 1 month after they were created.
 
Field
  1    2    3     4    5       6
  0    1    *      *    6        /opt/zimbra/bin/zmbackup -f -all
Backup Completion Email Notification
A backup report is sent to the admin mailbox when full and incremental backups are performed. This report shows the success or failure of the backup and includes information about when the backup started and ended, the number of accounts backed up and redo log sequence range.
If the backup failed, additional error information is included.
You can add additional recipient addresses or change the notification email address in the administration console Global Settings, Backup/Restore tab.
Full Backup Process
The full backup process goes through the following steps to backup the mailbox, the database, the indexes, and the LDAP directory:
1.
2.
3.
4.
a.
b.
c.
5.
6.
Full backup is usually run asynchronously. When you begin the full backup, the label of the ongoing backup process is immediately displayed. The backup continues in the background. You can use the zmbackupquery command to check the status of the running backup at any time.
Backup files are saved as zip files without compression. To change the default zip option, see Appendix A Command Line Interface, “zmbackup” on page 248.
Incremental Backup Process
Incremental backups are run using the CLI command, zmbackup. The process for incremental backup is as follows:
1.
2.
3.
Archived logs that are less than an hour old at the time of incremental backup are copied to the backup and are not deleted. These redologs are deleted one hour after the backup. The interval is set by the localconfig key backup_archived_redolog_keep_time. The default is 3600 seconds.
If no full backup for this account is found, the backup process performs a full backup on this account, even if only an incremental backup was specified.
4.
Example Backup Commands
zmbackup -f -s server1.domain.com -a all
zmbackup -i -s server1.domain.com -a all
Perform full backup of only user1’s mailbox on server1
zmbackup -f -s server1.domain.com -a user1@domain.com
Delete backup sessions either by label or by date. Deleting by label deletes that session and all backup sessions before that session. Deleting by date deletes all backup session prior to the specified date.
zmbackup -del 7d deletes backups older than 7 days from now. You can specify day (d), month (m), or year (y).
Finding Specific Backups
Each run of full or incremental backup creates a backup session, also known as the backup set.
The zmbackupquery command is used to find full backup sets. Each backup session is automatically labeled by date and time. For example, the label full-20070712.155951.123 says this is a backup from July 12, 2007 at 3:59:51.123.
Note: The times set in the session label are GMT, not the local time. GMT is used rather than local time to preserve visual ordering across daylight savings transitions.
The command can be used to find the following sessions:
zmbackupquery -lb full-20070712.155951.123
zmbackupquery --type full --from “2007/01/01 12:45:45”
zmbackupquery --type full
zmbackupquery -a user1@example.com --type full --from “2007/07/05 12:01:15” --to “2007/07/12 17:01:45”
Note: If a backup session is interrupted because the server crashes during backup (not aborted), the backup session that was interrupted was saved as a temporary session. The temporary backup session can be found at <backup target>/sessions_tmp directory. You can use the rm command to delete the directory.

Backup and Restore : Backing up using the Standard Method

Table of Contents Previous Next Index
ZCS Administrator's Guide Network Edition 6.0.8
Copyright © 2010 Zimbra Inc.