ZCS Administrator Guide 8.0
ZCS Administrator Guide 8.0
Network Edition


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.
Note:
Important: Users using the Zimbra Connector for Microsoft Outlook must perform an initial sync on the Outlook client when they log on after the Zimbra server is restored.
Examples
*
zmrestore -a all
*
zmrestore -a account@company.com
*
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.
*
zmrestore -a account@company.com-restoreToTime <arg>
Two common ways to write the <timearg> are
YYYY/MM/DD hh:mm:ss
*
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
*
zmrestore -a account@company.com --skipDeletes
Note:
Stop 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 .
*
zmbackupabort -r
Restore Mailboxes When Mail Server Is Down
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:
*
*
The offline restore must be run before the ZCS mailbox store server is started to keep the redo logs in sequence.
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.
The offline restore process goes through the following steps.
1.
2.
a.
b.
c.
d.
e.
Restore All Accounts
1.
zmrestoreoffline -a all
2.
zmcontrol startup
Restore 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.
1.
zmprov ma <account> zimbraAccountStatus maintenance
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.
zmprov ma <account> zimbraAccountStatus active
Important: If a user account is restored and the COS that the account was assigned no longer exists, the default COS is assigned to the account.
Exclude Items from a Restore
When you restore from a full backup, you can exclude the search index and blobs.
*
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
Restore the LDAP Server
In a disaster recovery where you need to restore the entire system, restore the 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
Copyright © 2012 VMware Inc.