The following assumes that you have a backup of the /opt/zimbra/backup directory and at least one full backup session (zmbackup -f -a all). I scheduled a full daily backup at 6pm using zmschedulebackup -R f '00 18 * * *' and then a backup server uses rsync to copy/synchronize the /opt/zimbra/backup directory.
First, stop the Zimbra services with zmcontrol stop and then re-install Zimbra from the original installation directory with /var/tmp/zcs/install.sh
Second, copy the backup directory from the backup tape/disc/server. In my steps here, it's from a backup server that has a shared folder:
Login as zimbra user.
Login as root.
/bin/mkdir -pv /mnt/restore
/bin/mount -r -t cifs -o username=backupuser,password=password,ro //backup/backup /mnt/restore
cp -rv /mnt/restore/zimbra/backup/* /opt/zimbra/backup/
Third, restore the LDAP directory:
echo Updating permissions...
/bin/chown -R root /opt/zimbra/backup
/bin/chgrp -R zimbra /opt/zimbra/backup
/bin/chmod -R 770 /opt/zimbra/backup
for x in $(ls /opt/zimbra/backup/sessions); do
chmod 440 /opt/zimbra/backup/sessions/$x/session.dat;
su – zimbra
zmrestoreldap -lbs (this lists the available sessions)
zmrestoreldap -lb session
Forth, start the Zimbra services, stop tomcat, and restore the accounts:
zmrestoreoffline -rf -a all
Fifth, regenerate the keys:
Sixth, log into the web administration interface.
Verify your global settings. When I tested the above disaster recovery steps, it did not restore "Relay MTA for external delivery" and it didn't rememer my SpamAssassin settings.