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


Backup and Restore : Restoring Data

Restoring Data
Three types of restore procedures can be run:
The zmrestore command is used to restore the mailboxes while the ZCS mailbox server is running.
The zmrestoreoffline is used to restore the mail server when the mail server is down. This command is run for disaster recovery.
The zmrestoreldap is used to restore the content of the LDAP directory server.
The restore process allows all accounts or individual accounts to be specified.
Restore Process
The zmrestore process goes through the following steps to restore the mailbox, the database, the indexes, and the LDAP directory.
1.
Retrieves specified accounts to be restored, or specify all for all accounts that have been backed up.
2.
a.
b.
c.
d.
e.
Important: Users using the ZCS Connector for Outlook must perform an initial sync on the Outlook client when they log on after the Zimbra server is restored.
Example
zmrestore -a all
zmrestore -a account@company.com
Note: A single account can be restored from the Administration Console as well.
Restore to a specific point in time (PIT). The following restore options affect redo log replay. If you do not specify one of these options, all redo logs since the full backup you're restoring from are replayed
Important:   After you perform any of the following point-in-time restores, you should immediately run a complete backup for those accounts to avoid future restore problems with those accounts.
A restore that is run using any of the following options is a point-in-time restore:
-restoreToTime <arg>- Replay the redo logs until the time specified.
-restoreToIncrLabel <arg> - Replay redo logs up to and including this incremental backup.
-restoreToRedoSeq <arg> - Replay up to and including this redo log sequence.
-br - Replays the redo logs in backup only, therefore excluding archived and current redo logs of the system.
-rf - Restores to the full backup only. This does not include any incremental backups at all.
Specify an exact time, the incremental backup label, or the redo log sequence to restore to. Restore stops at the earliest possible point in time if more than one point in time restore options are specified.
zmrestore -a account@company.com-restoreToTime <arg>
Two common ways to write the <timearg> are
YYYY/MM/DD hh:mm:ss
Perform an incremental restore only to last full backup, excluding incremental backups since then, for all accounts
zmrestore -rf --a all
zmrestore -ra -a account@company.com
zmrestore -ca -a account@company.com -pre restore
The result from the above example would be an account called restoreaccount@company.com.
zmrestore -sys
Include --contineOnError (-c) to the command so that the restore process continues if an error is encountered.
zmrestore -a all -c
When -c is designated, accounts that could not be restored are displayed when the restore process is complete
zmrestore -a account@company.com
zmrestore -a account@company.com -skipDeletedAccounts
To restore a mailbox, but exclude all the delete operations that were in the redolog replay. When the mailbox is restored it will contain messages that were deleted. This is useful if users use POP and remove messages from the server
zmrestore -a account@company.com --skipDeletes
Note: When the latest point in time is requested, do not add a backup label
(-lb). Without specifying the label, the most recent full backup before the requested point is automatically used as the starting point.
You can restore mailboxes from the administration console as well.
Stopping a Restore Process
The zmbackupabort -r command interrupts a restore that is in process. The restore process stops after the current account finishes being restored. The command displays a message showing which accounts were not restored .
To stop the restore type:
zmbackupabort -r
Offline Restore Process
The offline restore process can only be run when the mailboxd server is not running. In general, offline restore is run under the following circumstances:
Certain components of the Zimbra server are corrupted, and the server cannot be started. For example, the data in LDAP or the database are corrupted.
In a disaster recovery when the Zimbra software is reinstalled, if mailboxd is started before the backup files are restored, the mail server would begin to accept email messages and perform other activities, producing redo logs in the process. Since the pre-disaster data have not been restored to the server, the redo logs would be out of sequence. Once mailboxd is running, it would be too late to restore the pre-disaster data. For this reason, the offline restore must be run before the ZCS mailbox store server is started.
The offline restore process goes through the following steps.
1.
Specified accounts to be restored are retrieved. If the command-line does not specify any mailbox address, the list of all mailboxes on the specified mail host are retrieved from Zimbra LDAP directory server.
2.
a.
b.
c.
d.
e.
You must start mailboxd after the offline restore is complete. From the command line, type zmcontrol startup to start mailboxd.
Example
zmrestoreoffline -a all
Restoring Individual Accounts on a Live System
Use the zmrestore command to restore one or more selected accounts. In the event that a user’s mailbox has become corrupted, you might want to restore that user from the last full and incremental backup sets.
Note: You can also restore one account at a time from Accounts on the administration console.
To restore using the CLI command
1.
For each account to be restored, put the account into maintenance mode. From the command line, type zmprov ma <account> zimbraAccountStatus maintenance.
The maintenance mode prevents delivery of new emails during the restore. Otherwise, the emails would be overwritten during the restore process.
2.
Run the zmrestore command to restore the accounts.
zmrestore -a (account@abc.com account@abc.com)
3.
For each account that was restored, put the account back into active mode. From the command line, type
zmprov ma <account> zimbraAccountStatus active
Important: If an user account is restored and the COS that the account was assigned no longer exists, the default COS is assigned to the account.
Selectively Restore Items
When you restore from a full backup, you can select to exclude the following items from being restored
Search index. If you do not restore the search index data, the mailbox will have to be reindexed after the restore.
zmrestore <all or account> --exclude-search-index
Blobs. This is a useful option when all blobs for the mailbox being restored already exists.
zmrestore <all or account>|--exclude-blobs
HSM-blobs. This is useful when all HSM blobs for the mailbox being restored already exists.
zmrestore <all or account> --exclude-hsm-blobs
Restoring the LDAP Server
In a disaster recovery where you need to restore not just one server, but the entire system, you should restore your LDAP directory server first.
The zmrestoreldap command restores the global LDAP data including COS, distribution lists, etc. You can restore the complete LDAP server, which recreates the entire schema or you can restore specific accounts. You specify the session to restore. The restore command has to be run on the LDAP server being restored.
Examples
zmrestoreldap -lbs
zmrestoreldap -lb full20061130135236
zmrestoreldap -lb full20061130135236 -a tac@abc.com jane@abc.com

Backup and Restore : Restoring Data

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