recovering accidently deleted mailbox from whole machine bakcup

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
Post Reply
DubbaThony
Posts: 1
Joined: Fri Mar 08, 2019 5:42 pm

recovering accidently deleted mailbox from whole machine bakcup

Post by DubbaThony »

Hello Forums!

I have few e-mail accounts on my zimbra colaboration install that is hosted on virtual machine. While today I was doing extensive maintainance, for some reason Ive missclicked mailbox to remove, and now Im stuck without idea how to restore it. I have whole disk image backups in case I blow up something, so I re-created another instance of server from the backup. Of course, zimbra won't start becouse domains dont match and so on. Ive thought I can simply input this:

/opt/zimbra/bin/zmmailbox -z -m mailbox@example.com getRestURL \"//?fmt=tgz\" > /tmp/recovered.tgz
and scp it to main server. I wasn't aware that this requires zimbra to actually power on.
I tried to install new zimbra instance over previous one in hope that it will help, but I failed.
Ive reinstalled server from backup again for good measure.

I am considering to find proper mailbox in ~/store/0/X/msg/0 But ive seen that zimbra uses mysql backend and therefore Im afraid of data inconsistancy blowing up everything.

So please, this is my plan, please comment if that should work and what are pitfalls.

1. find correct mailbox ID, let's say it's 1.
2. tar /opt/zimbra/store/0/1/msg folder
3. send it to my main server
4. on working instance create new mailbox and watch what ID appeared
5. on working instance untar message files into mailbox directory
6. restart zimbra with fingers crossed
7. imapsync (that's tool I used a lot, so at this point nothing can go wrong)


PS. I'm beginner administrator, so please bear with me. I hope I put this post in correct forum. Also, I've read before posting quite a number of docs like Disaster Recovery, how to move zcs to other server etc.
PPS. Thank you for this beautyfull software, it is really awesome even if I use 10% of its potential.
Post Reply