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.
zmcontrol stop
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/ /bin/umount /mnt/restore sh /root/perms.sh Code:
#!/bin/sh
#perms.sh
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;
done
/opt/zimbra/libexec/zmfixperms Third, restore the LDAP directory:
su – zimbra zmcontrol stop zmrestoreldap -lbs (this lists the available sessions)
zmrestoreldap -lb session
Forth, start the Zimbra services, stop tomcat, and restore the accounts:
zmcontrol start tomcat stop zmrestoreoffline -sys zmrestoreoffline -rf -a all tomcat start
Fifth, regenerate the keys:
zmsshkeygen zmupdateauthkeys tomcat restart
Sixth, log into the web administration interface.
https://your.zimbra.domain.com:7071
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.