First of all its a premier - i agree with Phoenix - first time in my life so if oyu dont believe him believe me.
So you cannot say your system is restored cleanly - you simply cant - you will see if i dont if an error occurs but theres no real proof that it did
even if you check mailbox integrity and stuff like that this isnt a garantuee or any kind of proof everything is thing
you must understand zimbra uses -
a dynamic store on filebasis - so every file in there is sorted by IDs
those IDs are stored in the mysql backend - so the relation mysql and filesystem is very important
and to make things worse you got also an ldap store for all user account information things
in addition you cannot backup mysql while its running so easy
there are already aproches todo so but its way more comlicated - you have to store transaction logs and the bin position and restore them correctly - but these are specialsed products and theres a reason why almost every major backupsoftware on linux implemented a dump by mysql dump instead of simple filecopy
SO NO hotbackup of mysql - always a bad idea
hot backup mysql on zimbra because of massive write operations - desaster waiting to happen
Even if your hotbackp on mysql - and on ldap works - imagine the follwoing -
your rsync backuped mysql - fisnish
now a mail comes ins - zimbra do its magic wirtie to filesystem and mysql
now you backup the filesystem
when you restore you restore only the file but not the mysql data (or vice versa) -
ife no idea what will happen if zimbra decides to use that "unused" id for another mail again or - maybe worse you got a mysql db entry but no data on the restore ....
(i know ife simpliefed things...)
So defently hotbackup for restore a nogo -
however you can use hotbackup to reduce the downtime
you simply make several hotbackups a day and later on a certain time one coldbackup - your downtime reduce dramatically - down to a few minutes -
another adavantage is thats usually not so bad to restart the java vm once in a while java likes reboots hehe
in order to use my hotbackup/coldbackup combination you must be able todo incremental backups and be able to restore a certain version (exactly that version where you made the coldbackup)
ther a lot of rsync script they can do that easy
i dont use rsync i use another incremental backup but i can share you my prebackup and postbackup scripts - because i use the same job with a different time squedule i decide by time on which shedule im doing the shutdown
#declare -i chour
if ([ "$chour" -ge 5 ] && [ "$chour" -lt 6 ]) ; then
echo "Its" $chour "- Shutdown"
sudo -H -u zimbra /opt/zimbra/bin/zmcontrol stop
echo "Its" $chour "- No shutdown"
#declare -i chour
if ([ "$chour" -ge 5 ] && [ "$chour" -lt 11 ]) ; then
echo "Its" $chour "- Startup"
sudo -H -u zimbra /opt/zimbra/bin/zmcontrol start
echo "Its" $chour "- No Startup"
They are very simple - prebackup decide when to shutdown
postbackup restarts at the same time
i dont wanted to make a start zimbra all the time if its not nessesary even if it should do no damage - i simply dont do such things
so just define your incremental rsync job always with those script pre/post
and set the script on the time of rsync backup you wanna do cold