Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: Recover data from store folders

  1. #11
    Join Date
    Oct 2005
    Location
    Thatcher, AZ
    Posts
    5,606
    Rep Power
    21

    Default

    That's GOOD! Means it's actually starting. You'l need to change the mysql password because it was in your old config:
    Resetting LDAP & MySQL Passwords - Zimbra :: Wiki

  2. #12
    Join Date
    Apr 2008
    Posts
    1
    Rep Power
    7

    Default

    Quote Originally Posted by mmorse View Post
    How 'few users'?
    Method 2:
    zmlmtpinject -r user@domain.com -s sender@domain.com /opt/zimbra/location/#/#/msg/123-4.msg

    Injecting a whole folder of files would be:
    zmlmtpinject -r user@example.com -s sender@domain.com -d /opt/zimbra/location/#/#/
    I have the same problem because of a hdd failure. I could save the most data and wanted to import the mails for just two accounts. Thus I tried method 2 and it said everything worked fine:
    LmtpInject Finished
    submitted=1189 failed=0
    maximum concurrent active connections: 1
    113.38s, 95.36ms/msg, 10.49mps
    average message zie = 258.21KB
    That is the first folder I wanted to import. But there are not 1189 messages in my inbox but just one!
    I got the same problem with a second folder. I tried it a couple of times with changing results (up to 90% of the mails) - but I never got all mail.

    Any ideas where the problem could be?

  3. #13
    Join Date
    Dec 2007
    Location
    Stockton, CA
    Posts
    164
    Rep Power
    7

    Default

    I'm having a similar problem when using zmlmtpinject.

    I have a folder of 271 messages (.msg files). zmlmtpinject reports that 271 were submitted and 0 failed, but yet there are only 221 messages in the user's inbox (empty account).

    Is there a way to figure out why this is?

  4. #14
    Join Date
    Sep 2010
    Posts
    3
    Rep Power
    5

    Default

    its kind of an old thread, but i'd just like to share with others

    on my Zimbra box (see version details on tag), method #1 worked like a charm. although it shows a -d option, when i first tried to use it i got many Java exception errors..

    so.. since the user just wanted the mail, regardless if it has the correct date or not, i just ran the command clean, without any args... and it recovered with the correct dates, headers,...

    what's strange tho, is the fact that the user deleted some messages on like a 5 days period on the web interface, but they were just removed from the database.. as surprised as i could be (i was already restoring the backup..), i found the messages on the store folder !! ok, it was a pain to find them, lots of less and cat and grep but i eventually found it. marked the first one and last one, selected it, copied to another folder (for safety), and imported into one of my test accounts. after finding out it worked perfectly... you know the rest

    thanks MMorse... last time we had to do it, we went through the worst possible way: digging inside SQL and what not.. give me the creeps just reminding of it..

  5. #15
    Join Date
    Jan 2010
    Posts
    21
    Rep Power
    5

    Default Recovery script

    I had a similar problem, where my EC2 instance running zimbra died and could not be recovered. The /opt/zimbra were not backed up, but all the email was stored on EBS volumes.

    Once I reinstalled the server and attached the EBS volumes to it, I was able to access the mail store folder and recovery all the messages using mmorse's Method 1.

    I've wrote this simple script to automate recovery - it looks in each "user folder" in the store and scans the message to determine the correct user account by looking for the "delivered for" header in the email. It then runs the recovery procedure on each folder in the user folder automatically:

    archive_path=/srv/mail-volume-1/messages-old2; (cd $archive_path/0; for dir in *; do (cd $dir/msg; find . -type f | while read file; do (if file $file | grep gzip; then gunzip < $file; else cat $file; fi) | fgrep 'for <'; done) | perl -nle 'm|for <([^>\s]+)>| and $for{$1}++; END { for $name (sort { $for{$b} <=> $for{$a} } keys %for) { print "'$dir' $name"; last; } }'; done | sed -u -e 's/someuser@somedomain/somotheruser@somedomain/' | while read id name; do (echo "selectmailbox $name"; echo "createfolder /Recovery"; for p in $(ls $id/msg); do echo "addMessage /Recovery $archive_path/0/$id/msg/$p"; done; echo "quit") | su - zimbra -c 'zmmailbox -zadmin'; done)

    Note the 'sed' command in the middle there - the detection part will fail to correctly detect the account name if an account is mostly used for receiving email to an alias or using forwards. If that is the case, you can use the sed command to replace the incorrect account name with the correct account name.

    If you ever use this script, you should monitor the running process because it will not stop if an error is encountered. In such a case it will fail to recover all email in the folder where it encountered the error, that was not recovered before the error occurred. When such a thing happens (and it does quite often), you will need to go in manually and recover all the lost messages 1-by-1 by hand.
    Last edited by Oded Arbel; 06-09-2011 at 05:54 AM.

  6. #16
    Join Date
    Feb 2008
    Location
    Manta - Ecuador - South America
    Posts
    36
    Rep Power
    7

    Default Task recovery

    Hi,

    it is possible to recover the TASK from one specific user?

    Whith the listed methods I can restore the user emails, but no the task or calendar events. ¿It is possible? ¿Where can I found more info about it?

    Regards,

  7. #17
    Join Date
    Apr 2007
    Location
    Los Gatos, CA
    Posts
    138
    Rep Power
    8

    Default

    I know this is like super-old, but I had to do it for the first time. Any way of retrieving stuff Address Book, Calendar and Briefcase?

  8. #18
    Join Date
    Apr 2007
    Location
    Los Gatos, CA
    Posts
    138
    Rep Power
    8

    Default

    Quote Originally Posted by danielfarrelly View Post
    I know this is like super-old, but I had to do it for the first time. Any way of retrieving stuff Address Book, Calendar and Briefcase?
    Nevermind. It's all in there, just... blah.

  9. #19
    Join Date
    Apr 2007
    Location
    Los Gatos, CA
    Posts
    138
    Rep Power
    8

    Default

    Quote Originally Posted by jholder View Post
    What bits and peices?

    The ones that you need to care about are:
    /opt/zimbra/db
    /opt/zimbra/store
    /opt/zimbra/openldap-data OR /opt/zimbra/openldap.bak

    With those, we can rebuild.
    How would you go about a rebuild with that stuff?

Similar Threads

  1. mysql data store rebuild
    By ashelley in forum Administrators
    Replies: 3
    Last Post: 03-23-2010, 04:39 PM
  2. .pst migration issues
    By jimklein in forum Migration
    Replies: 13
    Last Post: 02-16-2009, 01:55 AM
  3. Error when Using Outlook PST Importer
    By chh in forum Zimbra Connector for Outlook
    Replies: 1
    Last Post: 01-19-2009, 05:20 AM
  4. IMAP error: unable to store IMAP message data
    By ebatte in forum Administrators
    Replies: 8
    Last Post: 04-27-2008, 10:50 PM
  5. Replies: 2
    Last Post: 02-12-2008, 11:55 AM

Posting Permissions

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