Discussions specific to the VMware vSphere hypervisor
Post Reply
Andreas Neufert
Veeam Software
Posts: 3235
Liked: 564 times
Joined: May 04, 2011 8:36 am
Full Name: Andreas Neufert Director of Product Management Global Alliances
Location: Germany

Zarafa Groupware Backup, Restore and Single Object Restore

Post by Andreas Neufert » Jan 07, 2013 8:10 pm 1 person likes this post

Hi world :D

Together with David Smith - Zarafa Groupware Advanced Engineer from mars Solutions Germany we found the following way for Zarafa Groupware Backup, Restore and Single Object Restore:

VM Preparations:
Zarafa Groupware runs on Linux. So the first thing you need to do, is to prepare the Linux VM for correct restore.
Set a static MAC in VM settings or edit the network settings in Linux that if MAC Address will change the LAN Adapter keeps his IP address.

Backup Job
Create a Backup Job and add the Zarafa Servers.
Enable VMware Tools quiescence.
Job-Storage-Advanced-vSphere-Enable VMware Tools quiescence

Pre-Freeze script
Zarafa uses a MySQL database for metadata and a file based content system.
To have a consistent copy of the MySQL database use the following pre-freeze script:

Code: Select all

/usr/bin/mysqldump --single-transaction --skip-opt --add-drop-table --add-locks --create-options --disable-keys --extended-insert --quick --set-charset  --all-databases --pass=demo > /var/backup/database.dump
exit 0
Place the script file as
and make it executable

Code: Select all

chmod +x /usr/sbin/pre-freeze-script
Create folder /var/backup
Run backup job and check if database.dump is now there at /var/backup/database.dump

SureBackup (to do automatically restore checks and to recover single object like mails):

Create a new xml File and place it here:
C:\Program Files\Veeam\Backup and Replication\SbRoles\ZarafaServer.xml

Code: Select all

<?xml version="1.0" encoding="utf-8" ?>
      <Name>Zarafa Server</Name>
            <Name>Zarafa Server</Name>
            <Arguments>%vm_ip% 236</Arguments>
Restart the Veeam Backup Service

Create a Virtual Lab (see Userguide)

Create a SureBackup Job "Zarafa Recovery Check" and add the Zarafa backup job.
Select the Servers/Job and tick the Roles: Mail Server and Zarafa Server

Hint: If you use LDAP/AD as a directory service together with Zarafa Groupware you need to backup this server as well and ad it as an Application Group to the SureBackup Job.

Run SureBackup job and check if everything runs successfull.

Recovery of the whole Server with "VM Recovery" or "Instant VM Recovery":
Restore the Server with "VM Recovery" or "Instant VM Reovery" but do not start the Server.
Edit VM Settings and disconnect (not delete!) the network interface. (You can use the checkboxes in Instant VM Recovery, too)
Start the VM and run the following command to restore Metadata Database to the dumped consisting state:

Code: Select all

/etc/init.d/zarafa-server stop
mysql --user=root --password=demo < /var/backup/database.dump
ini/etc/init.d/zarafa-server start
Hint: You can start the server without this step and trust the mySQL crash recovery procedure.
Have a lock at the syslog if it was successful then:

Code: Select all

tail -n 200 /car/log/syslog
Connect the network in the VM settings.

Single Object Restore / Single Mail Restore (Veeam Backup & Restore Enterprise):

This described process uses the recommended way from Zarafa by Using Veeam U-AIR technology.
Yes, this process is a little bit long, but the recommended way by Zarafa.

Start the Zarafa Groupware Server with the "Universal Application Item Recovery" => See Userguide

For File transfer preparation start the B&R User Interface and go to Managed Servers.
Add Zarafa Groupware Server.
Add the SureBackup Zarafa Groupware Server with it´s new IP address. Go Advanced - Preferred TCP Connection Role and tic "Run Server on this side"

Extract an User:

Go to the VirtualLab Zarafa Server.

List all existing Users

Code: Select all

/usr/bin/zarafa-admin -l

Export the User "max" to /var/backup/

Code: Select all

/usr/bin/zarafa-backup -a -v -u max -o /var/backup/
Hint: You can also extract all users if you have not much of them or not much data, with:

Code: Select all

/usr/bin/zarafa-backup -a -v -o 
Copy with Veeam File copy the export files to the same directory on the production Zarafa Server.

To restore the whole user "max":
Go the production Zarafa server and use

Code: Select all

cd /var/backup
/usr/share/zarafa-backup/full-restore.sh max
To restore a Single Mail we need to find and identify the object.
At best we use the normal Webinterface on the VirtualLab SureBackup Server and indentify the Subject.

Go the production Zarafa Sever and Search for the Subject of an Object(here for example: "Answer to your Mail - Invoice211")

Code: Select all

cd /var/backup
/usr/share/zarafa-backup/readable-index.pl max.index.zbk | grep "Answer to your Mail - Invoice211"
Identify the object id and restore it (in this example the command above showed that the object id was "48000000".
"max" is again our user.

Code: Select all

cd /var/backup
/usr/bin/zarafa-restore -v -u max 48000000

You can view a video how it works here:
http://www.veeam.com/de/videos/zarafa-b ... -1671.html
All comments are in German, but we talk about the exact same thing writen here above.

If you find this information helpful, please like it. If you need mor information or if you have questions leave a comment.

Happy backup and restore
CU Andy

VP, Product Management
Posts: 5260
Liked: 2125 times
Joined: Jun 05, 2009 12:57 pm
Full Name: Tom Sightler

Re: Zarafa Groupware Backup, Restore and Single Object Resto

Post by tsightler » Jan 07, 2013 8:40 pm

For single item recovery why not just connect to the lab copy of server using Outlook or some IMAP client (assuming they're running IMAP) and copy the item out?

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests