Results 1 to 4 of 4

Thread: [SOLVED] Upgrade-downgrade

  1. #1
    Join Date
    May 2007
    Location
    Europe
    Posts
    48
    Rep Power
    8

    Default [SOLVED] Upgrade-downgrade

    I have a huge problem.
    Yesterday I wanted to upgrade ZCS NE 5.0.1. I used bash completion to change dir and I ran install script. I was confused by user and didn't realize it was old "zcs" 4.5.10. I stopped the installation when the rpm packages were installing.

    How can I repair it? Any suggestions?
    I tried this: renamed zimbra folder, recreate folder, run 4.5.10 ./install -u, run 5.0.1 ./install -s, renamed zimbra folder to zimbra_ins and put back zimbra folder with data. But there missing folders because 4.5.10 installation removed it. I copied back those folders from zimbra_ins and no luck.
    I even tried installing completely from scratch with same configurations.
    Copied db,index and store to that new installation. Edited conf/localconfig.xml and put correct password for mysql...
    All services are starting ok, zmcontrol status gives me
    Code:
    Host mail.server.com
    	antispam                Running
    	antivirus               Running
    	ldap                    Running
    	logger                  Stopped
    		logmysql.server is not running
    	mailbox                 Running
    	mta                     Running
    	snmp                    Running
    	spell                   Running
    	stats                   Running
    When I try to log in zimbra web client I get
    Code:
    A network service error has occurred (zclient/io)
    I'm running out of ideas...
    All I need is access to mails it doesn't matter if this is pop, imap or webclient.

  2. #2
    Join Date
    May 2007
    Location
    Europe
    Posts
    48
    Rep Power
    8

    Default Possible solution

    I forgot to mention that this happened on zimbra NE and I have restored zimbra from backup.
    I'm just trying to get mails back from that individual day I was upgrading (read this as downgrading) and didn't make NE backup.
    I was testing this on separate server to get mails from that day.

    OK, I've come to another idea that could solve my problem.
    Does accounts preserve their ID etc.. when restoring from NE backup?
    And is it possible if I copy messages from zimbra store (zimbra where it all happened) back into zimbra that works and reindex all accounts?
    Would those mails I copied appear back in zimbra?? I just need a quick answer
    Last edited by Aleks; 05-24-2008 at 01:34 PM.

  3. #3
    Join Date
    May 2006
    Location
    USA
    Posts
    6,242
    Rep Power
    21

    Default

    Do open a support ticket when you get in a bind like that!
    Quote Originally Posted by Aleks View Post
    And is it possible if I copy messages from zimbra store (zimbra where it all happened) back into zimbra that works and reindex all accounts?
    Would those mails I copied appear back in zimbra?? I just need a quick answer
    So what you're looking to recover is the mails between the last incremental.
    See if you can first fanagle anything out of the redologs: On another isolated machine/VM basically copy some of the /opt/zimbra/redolog/archives over as well as the /opt/zimbra/backups (& don't use the -br option on zmrestore).
    CLI zmrestore Network Edition only - Zimbra :: Wiki & CLI zmrestore restoreToTime Network Edition only - Zimbra :: Wiki
    (For the future: In the 5.0.6+ there's a new zmplayredo that you can used to replay redologs.)

    If that doesn't work-
    Ok so you have a saved store somewhere I gather, you can't just 'plop them in' the store on the working machine. Indexing doesn't cover what's not in the DB, you still have to match up blobs to accounts.

    First make a good image of the messed up machine.

    It does sound like you managed to keep a decent chunk in-tact, granted trouble logging into ZWC but most things report running (a good /opt/zimbra/db, /opt/zimbra/store, & /opt/zimbra/openldap.bak ?) Assuming you/support can't resurect the messed up downgraded box's DB, you'd have to script something to identify all the mails contained in the store from the affected time window. That's no small job.

    ---

    If you've now got all those missing now in /RecoveryStore and you know what belongs to who...

    Method 1:
    zmmailbox -zadmin
    or
    zmmailbox adminAuthenticate -u https://server.domain.com:7071 admin@domain.com password
    mbox> selectMailbox user@domain.com
    mbox> createfolder /Recovery
    mbox> zmmailbox addMessage /RecoveryStore/0/1/msg/1
    All the mail in the subfolder will be added. Repeat for the remainder of the leaf folders in that mailbox's folder.

    Note: To get the dates correct I kinda remember some -d argument but you may need to rewrite X-Zimbra-Received header see: Using zmlmtpinject
    (Though I'm sure just getting the messages would be primary concern for most, you already know the date of the outage and you're injecting into a /Recovery folder anyways instead of the inbox.)

    Method 2:
    This method will have the messages showing up in inboxes.
    zmlmtpinject -r user@domain.com -s sender@domain.com /RecoveryStore/0/1/msg/1/123-4.msg

    Injecting a whole folder of files would be:
    zmlmtpinject -r user@example.com -s sender@domain.com -d /RecoveryStore/0/1/msg/1/

    If using this method you may want to change the global setting for zimbraMessageIdDedupeCacheSize to 0 for a bit. (default is 3000)

    zmlmtpinject [options] [files]
    [options]:
    -a,--address lmtp server (default localhost)
    -d,--directory message file directory
    -D,--domain default per-connection recipient domain (default example.zimbra.com)
    -N,--every report progress after every N messages (default 100)
    -p,--port lmtp server port (default 7025)
    -q,--quiet don't print per-message status
    -r,--recipient envelope recipients (rcpt to). This option accepts multiple arguments, so it can't be last if a list of input files is used.
    -S,--stopAfter stop after sending this many messages after warm-up
    -s,--sender envelope sender (mail from)
    -t,--threads number of worker threads (default 1)
    -T,--trace trace server/client traffic
    -u,--username username prefix (default "user")
    -w,--warmUpThreshold warm-up server with first N messages, then start measuring (default no warm-up)
    -z,--repeat repeatedly inject these messages NUM times
    (won't actually make additional physical copies unless you turn off the zimbraMessageIdDedupeCacheSize)
    [files]:
    Direct link to file in rfc822 format, or specify a directory.

    Note: To get the dates correct you need to rewrite X-Zimbra-Received header see: Using zmlmtpinject

    Method 3:
    You can POST an RFC822 formatted message to your inbox REST url to append messages to the inbox folder. Using curl, this would look like the following:

    curl -u username:yourpassword --data-binary @/tmp/rfc822.txt https://server/service/home/username/inbox

    Likewise you could create /RecoverFolders for each of the users first and send the files there.

    Method 4:
    Thick clients that can take .msg
    Import EML and MSG email message files into Outlook

    ---

    Remember there's no metadata (like tags/flags/read status) attached to these methods.
    Wherever possible I would provide a 'recovered' directory in the user's accounts.
    The folder structure can get confusing fast, and you'll hate yourself if you end up putting stuff in the wrong folders...
    One alternative is instead of working in the live you could setup an isolated temp box, import everything make it look 'pretty' then imapsync the temp box user's recoveryfolder > live.

    Best of luck, and I hope you don't have to go those tedious routes.
    Last edited by mmorse; 05-25-2008 at 07:50 AM.

  4. #4
    Join Date
    May 2007
    Location
    Europe
    Posts
    48
    Rep Power
    8

    Default

    Tnx for quick reply!!

    I have tested first and second method over the night. I really like second method. Dates are preserved, what is most important.

    I can filter out messages in store by date of file creation (about 300).
    Then find out ID's of users and inject them back in mailboxes.

    This post is very useful. Is this on wiki? It should be.
    Thanks for your post.

    Regards,
    Aleks

Similar Threads

  1. Replies: 4
    Last Post: 03-31-2008, 04:52 PM
  2. [SOLVED] Which do we Upgrade First, Zimbra, or the Connector?
    By darkdune in forum Zimbra Connector for Outlook
    Replies: 6
    Last Post: 03-20-2008, 06:11 PM
  3. Replies: 2
    Last Post: 10-04-2007, 04:20 PM
  4. M1 -> M2 Upgrade Scripts
    By KevinH in forum Announcements
    Replies: 57
    Last Post: 12-15-2005, 10:10 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
  •