Results 1 to 5 of 5

Thread: Buggered it all up, requesting advice

  1. #1
    Join Date
    Apr 2012
    Posts
    2
    Rep Power
    3

    Red face Buggered it all up, requesting advice

    Hi everyone,

    Server ran out of HD space due to the log file growing to over 160GB. Somehow, in the course of attempting to fix things, I managed to run zmldapinit. There's no backup, snapshot was removed so I could increase storage space in vmware, and I have been unable to locate any backup of the LDAP files. Naturally, ZCS won't start properly.

    I have now installed a completely new server (Ubuntu 10.04) and installed the latest ZCS on it, and have managed to recreate the accouts so that new mails are received and delivered to the users (very low number of actual users, less than 10.)

    My question is, would there be any way of copying the old messages to the new server, keeping the received dates intact? As far as I can tell, none of the normal tools would work, as I am unable to connect to the LDAP service.

    Original server was RHEL 5 (32bit), ZCS was 5.0.11 (upgraded to 6.0.6, and then to 7.2.0)

    New server is Ubuntu 10.4 (64bit) ZCS is 7.2.0

    I have no interest in recovering the original server (it was not set up by me, I'm just the poor mug who now has to look after them) but would greatly appreciate any advice on how I might move the old user data over to the new server.

  2. #2
    Join Date
    Nov 2008
    Location
    Grand Rapids, MI
    Posts
    123
    Rep Power
    6

    Default

    Without LDAP it'll be hard to figure out which accounts belong to who, but the data about which mails are in which folders is all in mysql, so if that's intact, you could piece it all back together.

    The messages in /opt/zimbra/store are usually the full messages, although not ever blob there is a message (some are calendar notes, briefcase items, etc). There should be enough header information in an email to parse out the datestamp from them and then use the SOAP API to reinject the messages into the new server in the appropriate user's account.

    Your easiest way will probably be to create a new folder in each user's account (call it "Recovered" or something) and just do your injection into that folder for each user, forgoing the information about which folders they belong in, and let the users sort it if they want. Having the messages at all (even unsorted) is probably better than not having them.

    If you want to go the whole route and try to determine what folders they go in, you'll need to get data out of mysql for that.

    Information about the structure of the data in MySQL is at: Account mailbox database structure - Zimbra :: Wiki

    I *think* the injection tool is zmlmtpinject but I'm not finding any decent resources on that on a quick Googling.. might take a little more browsing to find good docs on that.

  3. #3
    Join Date
    Nov 2008
    Location
    Grand Rapids, MI
    Posts
    123
    Rep Power
    6

    Default

    Oh, I refered to the SOAP API earlier, there's an AddMessageRequest SOAP API call that can be used for that, too, if you are at a fancy enough point in scripting where you can do SOAP.

  4. #4
    Join Date
    Apr 2012
    Posts
    2
    Rep Power
    3

    Default

    Hi justdave,

    Thank you for that, zmlmtpinject is exactly what I was looking for, and I think underdog's post at http://www.zimbra.com/forums/migrati...-question.html is zigackly what I need! Thanks again for pointing me in the right direction.

  5. #5
    Join Date
    Nov 2008
    Location
    Grand Rapids, MI
    Posts
    123
    Rep Power
    6

    Default

    ah, the other script I was thinking of was actually zmmailbox's 'addMessage' subcommand. If you have the blobs on disk you can just point zmmailbox at the blob and directly add it to the account.

    Code:
    zmmailbox -z -u {url} -m {emailaddress} addMessage -d {datestamp} "{foldername}" {path-to-blob-on-disk}

Similar Threads

  1. Advice for new server
    By ahmedjbh in forum Installation
    Replies: 1
    Last Post: 03-29-2012, 11:21 PM
  2. advice on hardware requirements
    By leocertuche in forum Administrators
    Replies: 0
    Last Post: 05-17-2011, 01:21 PM
  3. Advice on integrating a mailing list manager?
    By E S in forum Administrators
    Replies: 6
    Last Post: 04-10-2008, 04:06 PM
  4. Replies: 1
    Last Post: 02-02-2008, 06:53 AM
  5. Migration Advice
    By sgtstadanko in forum Installation
    Replies: 1
    Last Post: 04-15-2006, 05:17 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
  •