Results 1 to 5 of 5

Thread: migrate from Zimbra to Zimbra: passwords/contacts?

  1. #1
    Join Date
    Mar 2006
    Posts
    19
    Rep Power
    9

    Default migrate from Zimbra to Zimbra: passwords/contacts?

    I'm migrating users from one Zimbra server to another, and for a variety of reasons can't do a wholesale backup/restore of the /opt/zimbra directory. So I've created all the same accounts on the new server as on the old, and am using imapsync to sync up mail folders. I've run into two quandaries though:

    1) How can I extract passwords (encrypted) from the old server and set them directly on the new server? When I use zmprov, all I see is "userPassword: VALUE-BLOCKED" instead of the encrypted password. Is there a way to get the password entry?

    2) How can I copy over Contacts? The Contacts folder in Zimbra seems to be a special one, so that imapsync isn't able to copy "messages" from one server to the other in that folder... instead, I simply see repeated "NO APPEND failed" messages.

    Thanks!

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

    Default

    oh man
    Here's a great post I grabbed from a forum user Carlos a while ago. This might help:
    - Export your LDAP database with the command:
    Code:
    su - zimbra
    openldap/sbin/slapcat -f /opt/zimbra/conf/slapd.conf -l /tmp/ldap.ldif
    This will preserve the very essence of your Zimbra system

    - Stop Zimbra and move all your /opt/zimbra to a safe place. Your data is still there!

    - Rename the server to the old name. It is used to contact LDAP. It seems to work, as your tomcat is running, but you can change it later, once you get it up and running again.

    - Look carefully your upgrade log to see if the MySQL data was updated. If it was, do a clean install of the new version. If it wasn't, make a clean Zimbra install using the old version.

    - Verify that the new (and empty!) Zimbra works normally. If it doesn't then there is something wrong with the Zimbra SuSE distribution.

    - Stop Zimbra and do a backup of the fresh installation in case you need to start all over again (for instance with:
    rsync -av /opt/zimbra /somewhere/zimbra.fresh. If you need to restore it later on, you do rsync -av --delete /somewhere/zimbra.fresh/ /opt/zimbra/, do not forget the "/" at the end of the paths!).

    Now comes the tricky part. To recover your data you need to copy it back to the right place in the right way. Let start with LDAP.

    With the system stopped, you do:

    Code:
    su - zimbra
    rm -f openldap-data/*
    openldap/slapadd -f /opt/zimbra/conf/slapd.conf -l /tmp/ldap.ldif
    exit
    This should restore your LDAP database. You can do "openldap/slapcat -f /opt/zimbra/conf/slapd.conf" to verify that it works.

    Then you need to copy the following directories (as root):

    Code:
    cd /your/backup/directory
    rsync -av --delete db/ /opt/zimbra/db/
    rsync -av --delete index/ /opt/zimbra/index/
    rsync -av --delete logger/db/ /opt/zimbra/logger/db/
    rsync -av --delete ssl/ /opt/zimbra/ssl/
    rsync -av --delete store/ /opt/zimbra/store/
    rsync -av --delete conf/ /opt/zimbra/conf/

  3. #3
    Join Date
    Mar 2006
    Posts
    19
    Rep Power
    9

    Default

    ... thanks, I'll see if I can get the userPassword into the new server ...but does that mean there's no way to transfer (just) the Contacts to the new server?
    Last edited by ericding; 05-21-2007 at 11:18 AM.

  4. #4
    Join Date
    Aug 2005
    Posts
    228
    Rep Power
    10

    Default

    I forget which version the {get,Post}RestURL zmmailbox commands were added, but if you have them you should be able to do:

    Code:
    # old server
    zmprov sm user@domain gru /contacts > /tmp/contacts.csv
    
    # new server
    /zmprov sm user@domain pru /contacts /tmp/contacts.csv
    Bugzilla - Wiki - Downloads - Before posting... Search!

  5. #5
    Join Date
    Mar 2006
    Posts
    19
    Rep Power
    9

    Default

    excellent! thanks!

Similar Threads

  1. Replies: 26
    Last Post: 04-19-2011, 10:24 AM
  2. QUE Failure
    By tbullock in forum Administrators
    Replies: 31
    Last Post: 07-30-2008, 01:17 PM
  3. Zimbra shutdowns every n hours.
    By Andrewb in forum Administrators
    Replies: 13
    Last Post: 08-14-2007, 09:55 AM
  4. Getting problems in FC4 while instalation
    By kitty_bhoo in forum Installation
    Replies: 13
    Last Post: 09-12-2006, 11:34 PM
  5. Zimbra MTA and CentOS VPS on OpenVZ
    By czaveri in forum Installation
    Replies: 2
    Last Post: 03-20-2006, 09:42 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
  •