Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Migrating users between two Zimbra servers

  1. #1
    Join Date
    Sep 2005
    Posts
    41
    Rep Power
    10

    Default Migrating users between two Zimbra servers

    Hi,

    Is there an easy way to move an user from one Zimbra server to another? Say, I have server1.domain.com and server2.domain.com, both with working Zimbras and would like to move a given user 'testuser' from one to another with everything related to that user (e-mails, contacts, appointments, etc) without doind it by hand, is that possible?

    Regards,

    Rodrigo

  2. #2
    Join Date
    Nov 2005
    Posts
    518
    Rep Power
    10

    Default hmm i guess this is by hand, isn't it

    n.b: this applies to the network edition only

    i have yet to try out this hip trick myself, but assuming you have the same domain provisioned on server2.domain.com, you can zmbackup the account on server1.domain.com, copy that backup over, and zmrestore on server2.domain.com

    something like this (you may want to check out zmbackup -h and zmrestore -h)

    on server1.domain.com:
    1. zmbackup -f -a account@domain.com -t /tmp/account-domain-backup
    2. (tar-)zip everything under /tmp/account-domain-backup
    3. copy the zip file to another host

    on server2.domain.com:
    4. unzip; make sure the unzipped path has r/w permissions
    5. if domain.com is not already provisioned on server2.domain.com, use zmprov to create the domain (zmprov cd domain.com; restart tomcat)
    6. zmrestore -ra -a account@domain.com -t /tmp/account-domain-backup
    7. you may need to reset the restored user account's password (zmprov sp account@domain.com <new-password>)

    wherever:
    8. login as account@domain.com on server2.domain.com
    Last edited by bobby; 01-10-2006 at 08:35 PM.

  3. #3
    Join Date
    Sep 2005
    Posts
    41
    Rep Power
    10

    Default

    Quote Originally Posted by bobby
    something like this (you may want to check out zmbackup -h and zmrestore -h)
    Where are those tools? I couldn't find them in my M3 binary installation or in my M2 dev installation...

  4. #4
    Join Date
    Nov 2005
    Posts
    518
    Rep Power
    10

    Default

    yeah i spoke too soon; those tools are part of the network edition

  5. #5
    Join Date
    Nov 2005
    Posts
    518
    Rep Power
    10

    Default zmmailboxmove

    there is also a utility zmmailboxmove but it only works between servers in the same zimbra setup and afaik it only takes the mail, not the other stuff

  6. #6
    Join Date
    Jun 2006
    Location
    Indianapolis, IN
    Posts
    51
    Rep Power
    9

    Default Not working for me.

    I'm migrating from ZCS 4.0.0 (Network version) to 4.0.1 (Network version) on a different server:


    On first server:
    [zimbra@zimbra1 backup]$ zmbackup -f -a person@domain.com -t /opt/zimbra/backup/mydir
    full-20060921.151033.194

    On Second server
    [zimbra@zimbra1 backup]$ zmrestore -ra -a person@domain.com -t /opt/zimbra/backup/mydir
    Error occurred: no such account: Account ID for person@domain.com not found in backup

    Do I have to match that funky ID for that user somehow before it works?

    --Brian

  7. #7
    Join Date
    Sep 2005
    Posts
    2,103
    Rep Power
    14

    Default

    Quote Originally Posted by bjared
    I'm migrating from ZCS 4.0.0 (Network version) to 4.0.1 (Network version) on a different server:


    On first server:
    [zimbra@zimbra1 backup]$ zmbackup -f -a person@domain.com -t /opt/zimbra/backup/mydir
    full-20060921.151033.194

    On Second server
    [zimbra@zimbra1 backup]$ zmrestore -ra -a person@domain.com -t /opt/zimbra/backup/mydir
    Error occurred: no such account: Account ID for person@domain.com not found in backup

    Do I have to match that funky ID for that user somehow before it works?

    --Brian
    Is the backup done?

    zmbackupquery -v -t /opt/zimbra/backup/mydir
    Bugzilla - Wiki - Downloads - Before posting... Search!

  8. #8
    Join Date
    Jun 2006
    Location
    Indianapolis, IN
    Posts
    51
    Rep Power
    9

    Default Backup done?

    Oh, I didn't realize it was going to run in the background. I got my shell prompt back fairly quickly. (I did think that was a little "too fast")

    I thought it was either insanely fast, or the user's mailbox wasn't as big as I thought it was.

    Hmm, zmbackupquery said it had completed. OK, I tried it again with a fresh backup (and made sure it had finished).

    Evidently I can't have an account with that name already in the target server, because I got this:

    [zimbra@zimbra1 backup]$ zmrestore -ra -a person@domain.com -t /opt/zimbra/backup/mydir
    Error occurred: system failure: Account name has been reused by another account: person@domain.com

    Alright, deleting that and then rerunning zmrestore seems to have worked.

    Thanks for the zmbackupquery tip.

    --Brian

  9. #9
    Join Date
    Jun 2006
    Location
    Indianapolis, IN
    Posts
    51
    Rep Power
    9

    Default Found another caveat

    Well, the mailbox I moved on the 21st wasn't seeing any new mail. After 3+ hours of debugging/testing of various things. (his e-mail is forwarded from Lotus Notes, so that was one variable.) I did a diff between the outputs of 'zmprov ga working_guy@domain.com' and 'zmprov ga broken_guy@domain.com' to discover the broken guy's MTA was still set to the old server! Doing the followin g command:

    zmprov ma broken_guy@domain.com zimbraMailTransport lmtp:new-server.domain.com:7025

    Then, I followed it up with:

    postfix stop
    postfix start

    Voila, he can now get e-mail. Ugh.

    --Brian

  10. #10
    Join Date
    Sep 2006
    Posts
    32
    Rep Power
    9

    Default

    I discovered the same when restoring a mailbox to a different zimbra server.

Similar Threads

  1. Replies: 26
    Last Post: 04-19-2011, 09:24 AM
  2. zmtlsctl give LDAP error
    By sourcehound in forum Administrators
    Replies: 5
    Last Post: 03-11-2007, 03:48 PM
  3. dspam logrotate errors
    By michaeln in forum Users
    Replies: 7
    Last Post: 02-19-2007, 11:45 AM
  4. svn version still won't start
    By kinaole in forum Developers
    Replies: 0
    Last Post: 10-04-2006, 06:47 AM
  5. Replies: 16
    Last Post: 09-07-2006, 06:39 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
  •