Results 1 to 10 of 10

Thread: Restoring one mailbox

  1. #1
    Join Date
    Apr 2006
    Posts
    21
    Rep Power
    9

    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.

  2. #2
    Join Date
    Mar 2006
    Posts
    8
    Rep Power
    9

    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!!

  3. #3
    Join Date
    Apr 2006
    Posts
    21
    Rep Power
    9

    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.

  4. #4
    Join Date
    Aug 2005
    Posts
    1,433
    Rep Power
    12

    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!

  5. #5
    Join Date
    Apr 2006
    Posts
    21
    Rep Power
    9

    Default

    Thank you very much. Now another question. How can I find out the folder number of the deleted user?

  6. #6
    Join Date
    Apr 2006
    Posts
    21
    Rep Power
    9

    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?

  7. #7
    Join Date
    Mar 2006
    Posts
    8
    Rep Power
    9

    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!

  8. #8
    Join Date
    Mar 2006
    Posts
    8
    Rep Power
    9

    Default

    Looks like zmprov has the calendar functionality. If I have any luck I'll post my findings...

  9. #9
    Join Date
    Apr 2006
    Posts
    21
    Rep Power
    9

    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.

  10. #10
    Join Date
    Jul 2006
    Location
    New York, NY
    Posts
    122
    Rep Power
    9

    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.

Similar Threads

  1. Replies: 210
    Last Post: 01-17-2012, 12:19 AM
  2. Restore mail to another user's mailbox
    By zaf in forum Administrators
    Replies: 4
    Last Post: 02-08-2008, 07:26 AM
  3. MTA and Mailbox die periodically...
    By andreturpin in forum Administrators
    Replies: 3
    Last Post: 06-21-2006, 06:31 PM
  4. Internet Explorer waits forever to load mailbox
    By shanson in forum Administrators
    Replies: 7
    Last Post: 04-07-2006, 09:27 AM
  5. The mailbox and mta dies in FC4 GA version
    By meikka in forum Installation
    Replies: 72
    Last Post: 03-16-2006, 04:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •