1. Backing up Zarafa Collaboration Platform
with Veeam SureBackup
Joep Piscaer, VMware vExpert, VCDX #101
j.piscaer@virtuallifestyle.nl
@jpiscaer
2. Agenda
Introduction
What is backup application consistency
and why is it so important?
Evaluating Zarafa ZCP components
and relevance to application consistency
What options to backup Zarafa ZCP are available
within Veeam Backup & Replication?
Integrating application consistency into SureBackup
Demo
3. Agenda
Introduction
What is backup application consistency
and why is it so important?
Evaluating Zarafa ZCP components
and relevance to application consistency
What options to backup Zarafa ZCP are available
within Veeam Backup & Replication?
Integrating application consistency into SureBackup
Demo
4. Introduction
Joep Piscaer
● Consulting Architect at OGD ict-diensten
● VMware VCDX5 #101, vExpert 2009, 2011, 2012
● Know Veeam since 2007 and in love with them ever since
(best. VMworld. parties. ever.)
5. Past Projects
Past implementations of Veeam B&R
● Commonly see a VMware virtualization layer with Windows VMs on top
● But my own company uses Linux-based applications internally
Notable projects include
● Bi-directional DR for 200-250 VMs with 2 infrastructures
● 150+ VM backup and replication within a single large datacenter
● Application consistent backups of Zarafa Collaboration Platform without
bringing database down (or any other downtime)
● Numerous smaller projects for DR or backup at customer sites
6. Agenda
Introduction
What is backup application consistency
and why is it so important?
Evaluating Zarafa ZCP components
and relevance to application consistency
What options to backup Zarafa ZCP are available
within Veeam Backup & Replication?
Integrating application consistency into SureBackup
Demo
7. Consistency states
Crash consistency
“A crash consistent state does not have any quiescing and is
equivalent to a VM being powered off without being properly
shutdown.”
Filesystem consistency
“A file system consistent state is better because the operating system
is in a proper state to be backed up.”
Application consistency
“Finally, the best state is application consistent where applications
have also been properly prepared for backup.”
8. Why is application consistency important?
A consistent application (or transactional) state is
important, because:
It will prevent data loss or data corruption
It will improve RTO significantly for large data sets
9. How to force consistency?
Quiescing the VM, filesystem and/or application:
Pause VM and write all the transactional data
in memory to disk
Forces the state of the disk image to be
consistent, preventing data corruption or lengthy crash
recovery checks on filesystems and databases
10. Agenda
Introduction
What is backup application consistency
and why is it so important?
Evaluating Zarafa ZCP components
and relevance to application consistency
What options to backup Zarafa ZCP are available
within Veeam Backup & Replication?
Integrating application consistency into SureBackup
Demo
11. Zarafa components
Zarafa application components
● Core applications, WebAccess / WebApp, Z-Admin, postfix, Z-
Push, spamassassin, clamav, amavis, etc
MySQL database for metadata
and a file based content system
Authentication directory
DNS
12. Backing up Zarafa – What’s the big deal?
The application components or dependencies
are not the actual issue
We can rely on file system journal to recover data from
these application components
But the MySQL database is
It needs to be application-consistent instead of crash or
filesystem consistent
13. Agenda
Introduction
What is backup application consistency
and why is it so important?
Evaluating Zarafa ZCP components
and relevance to application consistency
What options to backup Zarafa ZCP are available
within Veeam Backup & Replication?
Integrating application consistency into SureBackup
Demo
14. Hot Backup of MySQL on a Linux VM
Two options to produce a transaction consistent backup of
MySQL databases:
● Option 1 stops the database and
application; all caches are lost
and need to be rebuilt; too big
a performance hit and impacts
service availability
● Options 2 produces a full copy
of the database, which is not
storage-friendly, and takes a
considerable amount of time.
Restore requires additional steps.
15. Hot Backup of MySQL on a Linux VM
Both options are not viable in our environment.
We can‟t stop the database or application for each backup:
● For service availability reasons
● Because the built-up caches for database and applications would be
lost, severely impacting application performance.
We cannot create a dump of the database:
● It would take too long with a big impact on storage (IOps and capacity)
● Restoring data from the dump requires additional steps
16. Hot Backup of MySQL on a Linux VM
We came up with a 3rd option:
Option 3. Lock database tables and flush to disk.
No downtime or service availability impact
No need to rebuild cache or create an entire copy of the
database.
Flushes all open tables in the database to disk while
preventing any changes to databases
17. Hot Backup of MySQL on a Linux VM
One problem though:
“Script can‟t quit the mysql shell else you will lose the lock”
This does not play nice with pre-freeze and
post-thaw scripts; since the pre-freeze script
quits and loses the lock…
Jelmer Jaarsma to the rescue!
My colleague found
a work-around
18. pre-freeze-script.sh
Create two temporary lock files and launch background
script. Pre-freeze script will run until database is locked.
Background script will flush tables to disk and write-lock
database. Finally, it removes a temporary lock file.
This signals the pre-freeze script that the database is
ready for snapshotting; the script terminates without error
With the pre-freeze script terminated, Veeam will now
create the snapshot (with the database locked)
20. post-thaw-script.sh
After the snapshot has been successfully created, the
post-thaw script removes the 2nd temporary lock file. This
will shut down the background script, unlocking the
database and continuing normal database operation
No downtime; just a couple of seconds database
query queue
21. Veeam backup job settings
There‟s no specific settings
inside the job
Enable VMware Tools quiescence
No „post job activity‟ in the
backup jobs settings
No application-aware
image processing (VSS)
22. Agenda
Introduction
What is backup application consistency
and why is it so important?
Evaluating Zarafa ZCP components
and relevance to application consistency
What options to backup Zarafa ZCP are available
within Veeam Backup & Replication?
Integrating application consistency into SureBackup
Demo
23. Backup and recovery verification
Transactionally consistent backups need to be verified
periodically to meet RPO and other SLA goals
Testing a restore manually is a painfully long and hard
process; it should include tests on all layers
(VM, filesystem, application)
The only real verification is to bring the VM back online in a
safe and isolated environment
Can be used to restore granular application items, too
24. Integrate Zarafa into SureBackup
Add a new role to SureBackup using ZarafaServer.xml
http://forums.veeam.com/viewtopic.php?f=24&t=15103&p=69768
Create a Virtual Lab
Create appropriate application groups
(including any dependencies like LDAP, DNS)
and select both „mail server‟ and „zarafa server‟ boxes
25. Restoring Zarafa
It‟s Linux; please prepare your VM‟s NIC settings
accordingly
static MAC address or retain IP after MAC changes
Full VM recovery does not need any manual steps
● the database is in a consistent state (no crash recovery)
and ready to go (no need to restore from a dump file)
26. Restoring Zarafa
Single Object Restore / Single Mail Restore
http://forums.veeam.com/viewtopic.php?f=24&t=15103&p=69768
● Add server to Managed Servers for File Copy
Advanced - Preferred TCP Connection Role - "Run Server on this side“
● Use U-AIR to boot up VM
● Extract an User:
/usr/bin/zarafa-backup -a -v -u max -o /var/backup/
● Use Veeam File Copy to restore files to production
● Restore User
/usr/share/zarafa-backup/full-restore.sh max
27. Agenda
Introduction
What is backup application consistency
and why is it so important?
Evaluating Zarafa ZCP components
and relevance to application consistency
What options to backup Zarafa ZCP are available
within Veeam Backup & Replication?
Integrating application consistency into SureBackup
Demo