Results 1 to 7 of 7

Thread: moving users from domainA serverA to domainB serverB

  1. #1
    winston6071 is offline Intermediate Member
    Join Date
    Jun 2012
    Posts
    16
    Rep Power
    3

    Default moving users from domainA serverA to domainB serverB

    hello

    i am new to zimbra and wanted to recheck some questions....

    i plan to move my users and all the content of files and calendar aso.. to a new server with a new domain. so therefore i try to find the best possible way doing this.

    so whats the best way to do so ?

    the old ServerAdomainA account should become an alias address at the new ServerBdomainB Account
    so the only thing i want is to move the existing box content to the new account at the new server and disable the mailbox. Theoretically i can do this each by each because we have less users. and after finish sending the user the new login data for the new server or changing the dns records to point to the new server ...

    The question is on howto do this in the best possible way. Or i am in the wrong direction. We have done some backups like this
    wget -q -O $BACKUPPATH/$username.tgz --no-check-certificate --http-user=$ADMINUSER --http-password=$ADMINPWD https://localhost:7071/service/home/$username/?fmt=tgz

    creating a new user at the new server and the export above
    and import it ....
    what needs to be considered for propper working?

    i have seen a lot of ways to migrate somehow ... but i think this scenario can be done very easy.

    thanks in advance for information

    cheers winston

  2. #2
    federico.bertola's Avatar
    federico.bertola is offline Special Member
    Join Date
    Jul 2006
    Location
    Verona, Italy
    Posts
    153
    Rep Power
    8

    Default

    If you chose to do in this way, you'll lose many informations in the migration process, such as shared folders, specific user preferences, distribution lists and many other little details... I suggest you to try ZxMig, that is designed for this needs. Check also this guide to minimize your downtime during migration.
    I never try to change the domain moving from a server to another but I think that you can cange it after migration with "zmprov rd ..." command.

    I hope this will help.
    Federico Bertola
    CTO @ StudioStorti

  3. #3
    winston6071 is offline Intermediate Member
    Join Date
    Jun 2012
    Posts
    16
    Rep Power
    3

    Default

    thanks a lot for the information, i will just check the docu and see what is it about.

    if any other have any idea for other best practice let me know.

  4. #4
    LMStone's Avatar
    LMStone is offline Moderator
    Join Date
    Sep 2006
    Location
    477 Congress Street | Portland, ME 04101
    Posts
    1,367
    Rep Power
    10

    Default

    Quote Originally Posted by winston6071 View Post
    hello

    i am new to zimbra and wanted to recheck some questions....

    i plan to move my users and all the content of files and calendar aso.. to a new server with a new domain. so therefore i try to find the best possible way doing this.

    so whats the best way to do so ?

    the old ServerAdomainA account should become an alias address at the new ServerBdomainB Account
    so the only thing i want is to move the existing box content to the new account at the new server and disable the mailbox. Theoretically i can do this each by each because we have less users. and after finish sending the user the new login data for the new server or changing the dns records to point to the new server ...

    The question is on howto do this in the best possible way. Or i am in the wrong direction. We have done some backups like this
    wget -q -O $BACKUPPATH/$username.tgz --no-check-certificate --http-user=$ADMINUSER --http-password=$ADMINPWD https://localhost:7071/service/home/$username/?fmt=tgz

    creating a new user at the new server and the export above
    and import it ....
    what needs to be considered for propper working?

    i have seen a lot of ways to migrate somehow ... but i think this scenario can be done very easy.

    thanks in advance for information

    cheers winston
    Zimbra allows you to rename domains (which also renames all of the mailboxes in the domain) as well as to add domain aliases.

    What you describe seems like a lot of extra work if I understand correctly what you want to accomplish.

    Have you considered either renaming the existing domain on the old server (or adding a domain alias) and then doing a Zimbra server-to-server migration using the so-called "./install.sh -s" method?

    Hope that helps,
    Mark

  5. #5
    winston6071 is offline Intermediate Member
    Join Date
    Jun 2012
    Posts
    16
    Rep Power
    3

    Default

    Hello Mark!

    i had to migrate some other servers so i lost the point with zimbra, so back on topics now. i just red your recommendations, thanks for that, the minus s options seems to be great, i found this article to this » Zimbra :: Blog, and it seems its exactly doing what i want except the renaming of the domain.
    Do you think it worths it a try to migrate it as described in the article --> to move it to the new server and do a domain rename as federico metioned afterwards ? or does it have the be renamed first. because the new server was installed completetly for the EU domain. So no dns stuff in the split dns for the at domain on the new server.

    the old Server was has the main domain "domainA.AT" the alias domain is "domainA.EU" on the new server it should be exactly the opposite then.

    1. the best case would be to do a complete backup as described in the article on the old server.
    2. zmprov changing the domain name from .at to .eu
    3. shutdown the services of zimbra
    4. do a complete copy of the directory
    5. import this on the new server and startup services, what basic config files do i have to change? because hostname and ipadress changes ? all directorys should be the same as on the old server ?
    6. change isp dns entry for the old domain to point to the new server which accpets now the old .at domain as alias domain...
    7. change the isp dns entry for the .eu domain to point to the new server too.
    8. if anything wents wrong, changing back the dns entries for both domains to the old server and copy back the first datacopy without the domain rename

    anthing counts against that workflow ? except a downtime of the servers. this is acceptable. but i have to test ist first because i do not know the copy time from ServerA to ServerB because the Data size is not to small :-)
    if this downtime is to high i need another scenario.
    maybe i think then about chaning the ISP DNS to the new domain to the new server but not accepting anthing yet, so i could theoretically have a 48 hour window before senders are creating the undeliverable message.... depending on their configs i know,.,.

    if i finish the whole thing i will create a good docu and post it as a workflow with options like i mentioned at the end for no downtimes...

    cheers winston

  6. #6
    LMStone's Avatar
    LMStone is offline Moderator
    Join Date
    Sep 2006
    Location
    477 Congress Street | Portland, ME 04101
    Posts
    1,367
    Rep Power
    10

    Default

    Quote Originally Posted by winston6071 View Post
    Hello Mark!

    i had to migrate some other servers so i lost the point with zimbra, so back on topics now. i just red your recommendations, thanks for that, the minus s options seems to be great, i found this article to this » Zimbra :: Blog, and it seems its exactly doing what i want except the renaming of the domain.
    Do you think it worths it a try to migrate it as described in the article --> to move it to the new server and do a domain rename as federico metioned afterwards ? or does it have the be renamed first. because the new server was installed completetly for the EU domain. So no dns stuff in the split dns for the at domain on the new server.

    the old Server was has the main domain "domainA.AT" the alias domain is "domainA.EU" on the new server it should be exactly the opposite then.

    1. the best case would be to do a complete backup as described in the article on the old server.
    2. zmprov changing the domain name from .at to .eu
    3. shutdown the services of zimbra
    4. do a complete copy of the directory
    5. import this on the new server and startup services, what basic config files do i have to change? because hostname and ipadress changes ? all directorys should be the same as on the old server ?
    6. change isp dns entry for the old domain to point to the new server which accpets now the old .at domain as alias domain...
    7. change the isp dns entry for the .eu domain to point to the new server too.
    8. if anything wents wrong, changing back the dns entries for both domains to the old server and copy back the first datacopy without the domain rename

    anthing counts against that workflow ? except a downtime of the servers. this is acceptable. but i have to test ist first because i do not know the copy time from ServerA to ServerB because the Data size is not to small :-)
    if this downtime is to high i need another scenario.
    maybe i think then about chaning the ISP DNS to the new domain to the new server but not accepting anthing yet, so i could theoretically have a 48 hour window before senders are creating the undeliverable message.... depending on their configs i know,.,.

    if i finish the whole thing i will create a good docu and post it as a workflow with options like i mentioned at the end for no downtimes...

    cheers winston
    If the old server is working OK I would clean it up first to buy you some time.

    Specifically, if you want to swap what is now the alias domain with the real domain, you can do this very fast:
    1. Open the Admin Console and a command prompt as the Zimbra user.
    2. In the Admin Console, delete the alias domain.
    3. In the command prompt, rename the domain to what was the alias.
    4. In the Admin Console add back the old domain as an alias domain.


    You can then practice the server-to-server migration per the wiki article from AJ Cody. Note that actual downtime will be very small because you rsync a few times over several days/weeks in the background. Only the final rsync requires the production Zimbra server to be shut down during the rsync.

    Hope that helps,
    Mark

  7. #7
    winston6071 is offline Intermediate Member
    Join Date
    Jun 2012
    Posts
    16
    Rep Power
    3

    Default

    Sorry People for beeing so rare, but time is something which i really do not have right now :-)

    anyway i want to share my information with all of you in hope that this thread might help anyone sometime.

    I finished the Mail Server Migration from ServerA to ServerB Version 7.1.3
    What have i done at the end.

    1. Setup the New ServerB same as ServerA (exact same Zimbra Version, exact same Linux Version)
    2. Setup in my case the Splitt DNS stuff to make the new server with the NEW domain running
    3. make sure that the hostname is the same to minimize migration troubles
    4. rename the domain at ServerA to the new Domain which will be the new Main domain. do this with (zmprov -l rd [olddomain.com] [newdomain.com])
    5. you might need to remove the newdomain from alias domains to be allowed to do this. after rename do it viceversa and use the old domain as alias.
    6. now you have to tell all the users that they need to go into the preferences and set the MAIN domain name as the new MAIN Domain, because with the rename domain this is not changed.
    7. Done with the preparation of the old server with new domain. and setup old domain as alias domain, and tell users to switch the main domain address
    8. rsync data from serverA to ServerB
    9. at the new server have the zcs....x.x.x...tgz same version downloaded and extract it to a temp folder, from there do and install.sh -s, this installs the Server for the RPM Packagin and creates a dummy installation
    10. remove the new created zimbra directory, rm -r /opt/zimbra
    11. rsync the data from your previously created sync dir into the /opt/zimbra
    12. now you have to make sure that the UIDS are the same as on the old server, if not as it was here goto the /opt/zimbra/conf/localconf.xml file and make it the same as it is now on the new server, check passwd and group files in /etc to be sure.
    13. now goto the zcs extracted temp dir and do ./install.sh without the -s option. zimbra will find the installation and asking you if you want to upgrade, YES ... let it finish (if you get an sql error at the checkings, as it was here, my rsync did leave out some directories...) i made a new rsync from the old server and it worked perfectly
    14. now you have to goto and call /opt/zimbra/bin/zmfixperms -extened, this fixes the directory structure of zimbra with user and group rights.... make sure you did rsync with -l option for the links aso ....
    15. after this you have to goto /opt/zimbra/.ssh and to chown zimbra:zimbra for the directory and the files inside, this is important because without this your server will have the certificate problems because fixperms does not do this for you.
    16.after installation is finished and all is running, goto the admin console and goto server settings and change the "MTA Trusted Networks" to the new environment or call zmprov ms Servername zimbraMTAMyNetworks "127.0.0.0/8 yourlocalIPRange/xx yourPublicIPRange/xx"
    17. now switch the DNS records and call your providers for the reversedns entries for your hosted domains.
    18. now you have to correct the rest of the emails which where coming in, in the time you rsync and setup everything... manual goto each user and export from begintime to endtime of your rsync time and DNS records change.... until new emails went into the new server. or create a script and do a wget of the users mailbox, and use the url which is used when you would do a manual export and change the username to the variable ..... if you have hundrets of users, you might think of disable the access to your server by now, i didnt
    19. now goto the new server and import this at the users level and the mails are back.

    note if it is possible to have in the migration period the old server shutted down, this will let you remove the last steps... not possible here because of to much data the migration process took more than 10 hours because of the rsync.

    I hope i did not miss anything and this will help someone doing the same thing, especially there are some details which you will definitly stumble into even there is a good red line on howto do it. As is did i felt into all these little steps which made some troubles.

    THANKS for YOUR HELP

    cheers joe

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. SMTP AUTH error on multi server configuration
    By inigoml in forum Administrators
    Replies: 1
    Last Post: 11-02-2010, 09:42 AM
  2. Moving Folders between users
    By plan9 in forum Administrators
    Replies: 10
    Last Post: 09-30-2010, 10:13 AM
  3. Replies: 3
    Last Post: 10-23-2007, 06:00 PM
  4. Moving Zimbra, newly created users unable to log in.
    By mogmismo in forum Administrators
    Replies: 2
    Last Post: 07-24-2007, 08:12 PM
  5. Moving Mac Users from Exchange/Entourage...
    By NWade in forum Migration
    Replies: 2
    Last Post: 05-02-2007, 11:12 AM

Tags for this Thread

Posting Permissions

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