Restore From Backup
I have been backing up e-mail with zmmailbox with command:
/opt/zimbra/bin/zmmailbox -z -m email@example.com getRestURL "//?fmt=zip&query=is:anywhere" > $BUL/zimbra/user.weekly.zip
I've tested restoring the above with command:
/opt/zimbra/bin/zmmailbox -z -m firstname.lastname@example.org postRestURL “//?fmt=zip&resolve=reset” /archive/zimbra/user.weekly.zip
With my testing these backups appeared to be 100% good.
I am in a situation where I need to process an actual recovery. When I restore the data it appears to only be restoring data from the date of the very first time this backup was run. I did not notice this in my testing.
When I manually open the .zip file all of the new e-mails are present.
These new e-mails are not being restored when I run the restore command via the command console.
These e-mail accounts have up to 40G of e-mails, and they just stop importing after a time if I import via the Zimbra import area under the preference section in the Zimbra web portal. However it appears that all the e-mails are being processed this way before they simply stop working.
I've started researching, and I was hoping to get some helpful suggestions on what I should be doing to restore these messages.
Is this a database issue?
Thanks for the helpful suggestions.
You can backup account using zmbackup utility as
zmbackup -f -a email@example.com -s server1.domain.com
and restore this by
zmrestore -a firstname.lastname@example.org
Hope this helps
Thank you for the reference for suggested backups using the network edition product. For reference sake zmbackup is available only with the network edition product.
For reference my resolution for this issue was to extract the .zips and import data manually with:
# for i in *.eml ; do /opt/zimbra/bin/zmmailbox -z -m email@example.com addMessage /folder/in/zimbra "$i" ; done
The folder you are importing to exampled /folder/in/zimbra needs to exist in zimbra. You need to be in the directory where the e-mail is that you need to import into zimbra. So after you extract the .zip move into that directory then run this command. This is very time consuming. It is not realistic for large facilities. However if you are large facility you should be using network edition...
My estimation of the source of the issue is either a memory error, or some issue with .zip files not storing meta data. As of yet, tgz have been testing well for me. However .zip files passed all of my testing.
I have changed the backup for this server to .tgz referenced in this site:
ZCS-to-ZCS Migrations :: Zimbra :: Blog
At a later time I will be switching my backup procedure to the "hot" backup on this site:
Backing up and restoring Zimbra (Open Source Version) - Zimbra :: Wiki