When trying to create a backup of zimbra open source edition 8.0.1+ I ran into issues with data.mdb 'exploding'.
While my /opt/zimbra directory is only about 8GB my backup is around 80GB.
both rsync and copy fail to work properly.
When trying to create a backup of zimbra open source edition 8.0.1+ I ran into issues with data.mdb 'exploding'.
While my /opt/zimbra directory is only about 8GB my backup is around 80GB.
both rsync and copy fail to work properly.
The data.mdb file is actually a thin provisioned 86GB (by default) file.
Rsync and sometimes cp commands will 'explode' the file to it's full size when copying to a backup directory.
This obviously doesn't help if you want to create an offsite backup or if you are limited in resources.
This behavior seems new in 8.0.1
The proper way to prevent this is to split your backup into 3 parts. Below my example backup script (to be executed as root).
Frist Stop zimbra and kill whatever is left.
Next backup the /opt/zimbra directory EXCLUDING the /opt/zimbra/data/ldap directory.
Next convert the ldap files into ldif files with the build in zmslapcat command.
You can choose to first start the server again as this command can be ran while zimbra is running. but just to be sure we get a backup of a frozen environment we'll leave it stopped for now.
This script was tested on zimbra 8.0.1 under ubuntu server 14.04.
It should work on most distributions and versions above 8.0.1
Depending on which tool you use for backups, some do support sparse files, though that support isn't as quick as the real data would suggest.
Unfortunately, my favorite backup too, rdiff-backup, doesn't have sparse file support currently. I have seen a patch to make it support sparse files, but the devs haven't pull'ed. I haven't done anything with it either.
Duplicity doesn't appear to have sparse file support either. I didn't look very deep.
There are probably others which support it. I know that moving a qcow2 image around with a sparse file inside worked as expected.
As for backups, with something as complex as Zimbra, I hope everyone is using LVM2 snapshots or ZFS snapshots to avoid downtime, then run the backup against the snapshot storage.