Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-23-2007, 10:14 AM
Intermediate Member
 
Posts: 21
Default Restoring one mailbox

Hello All

Somebody has accidentally deleted one mailbox from the server v4 opensource. I have a back up of the complete system (everything under /opt/zimbra) which is 2 months old. How can restore that specific account back from this backup?

Thanking you in advance
Regards
Kia

Last edited by kibo; 02-23-2007 at 10:51 AM..
Reply With Quote
  #2 (permalink)  
Old 02-23-2007, 10:34 AM
Junior Member
 
Posts: 8
Default

I went through the same thing recently...

I pulled over all their files from /opt/zimbra/store (storing them in say /tmp/backup/). Then I did (as user zimbra):

% zmmailbox -z

adminAuthenticate admin@acme.com my_password
sm deleted_user
cf /Recover
addMessage /Recover /tmp/backup/msg/0 /tmp/backup/msg/1 <etc>
exit

I still need to figure out how to copy over the calendar though. If anyone knows how to pull over the calendar please let me know!!
Reply With Quote
  #3 (permalink)  
Old 02-23-2007, 10:53 AM
Intermediate Member
 
Posts: 21
Default

Thank you Madcat

This certainly helps. But how can I recover all messages. How can I put this in an script? This way for each message I need to issue one recover command.
Reply With Quote
  #4 (permalink)  
Old 02-23-2007, 11:05 AM
Zimbra Employee
 
Posts: 1,434
Default Point it at a folder...

I believe that you can point zmmailbox addMessage at a folder full of messages and have it add all of them.
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
Reply With Quote
  #5 (permalink)  
Old 02-23-2007, 11:35 AM
Intermediate Member
 
Posts: 21
Default

Thank you very much. Now another question. How can I find out the folder number of the deleted user?
Reply With Quote
  #6 (permalink)  
Old 02-23-2007, 12:25 PM
Intermediate Member
 
Posts: 21
Default Success!

Great! Thanks for those who helped, I recovered the data. For finding the mailbox, I did a grep. It took a long time but at last I found it! In fact it adds the whole e-mails in the folder. So for each folder in the user inbox, the command should be run separately. Now, as Madcat mentioned, the only problem is the rest of the information. Critically contacts and then calender. Any ideas?
Reply With Quote
  #7 (permalink)  
Old 02-23-2007, 02:07 PM
Junior Member
 
Posts: 8
Default

I wrote a Perl script that extracted the email/userid from the database and then piped the input into zmmailbox. It took a few hours to roll through 600+ email accounts. 5 power outages in one day scrambled my clients email server...

Sounds like we are in the same boat regarding the calendar. If someone knows how to get the data I'll be happy to provide a sh/perl script!
Reply With Quote
  #8 (permalink)  
Old 02-23-2007, 02:35 PM
Junior Member
 
Posts: 8
Default

Looks like zmprov has the calendar functionality. If I have any luck I'll post my findings...
Reply With Quote
  #9 (permalink)  
Old 02-23-2007, 11:41 PM
Intermediate Member
 
Posts: 21
Default

I looked into it more. It seems that to extract the contacts, the only way is to at least run OpenLDAP with its database on some another machine and then extract data out of it.
Reply With Quote
  #10 (permalink)  
Old 02-28-2007, 09:31 AM
Special Member
 
Posts: 122
Default

I have to say you guys rock, this was the last step keeping me from fully implementing zimbra. I've been using it interchangeably with Exchange for the last 6 months and it easily trumps Exchange.

Madcat if you wouldn't mind could you send me the perl script that you wrote, I would like to test it on a spare mailbox server I just installed.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.