Page 1 of 5 123 ... LastLast
Results 1 to 15 of 75

Thread: Guide for transferring all accounts to a new server

  1. #1
    Registered Member
    Join Date
    Apr 2003
    Posts
    479

    Default Guide for transferring all accounts to a new server

    I found this guide at /http://www.forum-forum.com/forum/showthread.php?s=&threadid=1160 (link down now). I found it VERY useful in making a smooth transfer of accounts. I hope you'll find it useful too. I did not originally write this, and I don't know who did. I modified some of the steps, added a few things, most of which are italicized. Please post if you have any changes/additions.

    -------------

    Before you do the transfer, don't forget to make sure the new server is working - recompile apache and PHP with all the features you need. Make sure Exim and Named are working. Do a transfer of a test account and make sure it works.


    Ready to transfer server providers?
    24-48 hours before transfer:

    1. SSH to old server as root
    2. cd /var/named
    3. perl -pi.bak -e "s/14400/399/g" *.db
    4. /etc/rc.d/init.d/named restart

    Here we have edited every single dns zone and created a .bak of each (just in case you need to revert). Changing the TTL from 14400 (24 hours) to 399 (under 7 minutes) means that as soon as you make a change to a dns zone, it will take effect within 7 minutes as opposed to 24 hours. I chose 399 because it should not appear anywhere else in the zone files so it will be easy to change back. This will be helpful after transfering the account because we want the sites to be pointing to the new server ASAP so that file changes, new emails, etc all get to the new server and don't get "lost." Make sure that you do this though at least 24 hours before starting the transfer, that is how long it will take the internet to "find out" that they need to check the dns server every 15 minutes instead of 24 hours. (I hope that made sense)

    If you do not have root access, you can ask your provider to do this or do it manually with WHM's DNS editing feature (very tedious...)


    Right before you do the transfer...
    To make a smooth transfer without loosing any email, shut down exim here to avoid delivering any email to the old server. The email will be delivered to the new server when it becomes active. You should also tell your clients when the move is taking place so they're not angry when they lose posts in a forum or changes to their site at this time. Maybe you also want to stop ftp and cpanel too.

    1. SSH to old server as root
    2. service chkservd stop
    3. /etc/rc.d/init.d/exim stop
    4. /etc/rc.d/init.d/pure-ftpd stop;/scripts/ckillall -9 pure-ftpd;/scripts/ckillall -9 pure-authd;/etc/rc.d/init.d/proftpd stop;
    5. /etc/rc.d/init.d/cpanel stop

    Now to automatically sync the DNS changes when you move the accounts, you should setup DNS Clustering. To do this:
    1. Login to old server WHM
    2. Configure Cluster
    3. Add a new server to the old server's cluster by entering your new server's ip address. You will need the remote access key from the new server (get this at WHM's Setup Remote Access Key on the new server).
    4. Login to the new server WHM.
    5. Configure Cluster
    6. Add a old server to the new server's cluster by entering your old server's ip address. You will need the remote access key from the old server (get this at WHM's Setup Remote Access Key on the old server).
    5. The DNS zones will now be syncronized between the two servers. When you transfer accounts the DNS will be changed to the new server.


    READY to Transfer? Here we go:

    1. Login to new server's WHM, click on copy multiple accounts
    2. Fill out the info
    3. Select the accounts to transfer, if you chose select all at the bottom note that you will assign every account it's own ip address unless you manually unselect assign ip address to the side of every account.
    4. Sit back and relax. As the sites are transferred, the dns changes on the old server so you will start seeing the sites work on the new server within a few minutes of each transfer.

    THIS IS NO LONGER NECESSARY IF YOU USE DNS CLUSTERING!
    Transfers have completed, let's make the change happen! Here we go:

    1. Login to old server as root
    2. cd /var/named
    3. perl -pi.bak -e "s/[oldip]/[newip]/g" *.db
    4. /etc/rc.d/init.d/named restart

    This will point all the sites to the newip. Hopefully most of your sites are on a shared ip. For all the accounts that are NOT on a shared ip you will need to copy the .db.bak for that domain to .db and edit it to reflect the new IP.
    MAKE SURE that you restore the back up file (.db.bak) for the old server's hostname and namesevers, otherwise your DNS will be useless.




    Transfer completed. Wait a few minutes and make sure everything is working.

    All sites are moved from the old server to the new one and are working on the new one. On the new server you should change the DNS TTL back to 24 hours to prevent too many DNS requests. The low number shouldn't be too bad, but its a good idea to change it back.

    1. SSH to new server as root
    2. cd /var/named
    3. perl -pi.bak -e "s/399/14400/g" *.db
    4. /etc/rc.d/init.d/named restart



    Sites should functioning on new server within a few minutes of their transfer, now transfer the nameservers! Here we go:

    Be sure to set up your NEW nameservers on the NEW server (see setting up nameserver). WHM will only add an A record for the oldips (until you transfer the nameservers with the registrar) so you need to edit the DNS zone to reflect the new ips.

    Submit the ip changes to your registrar and give it 48 hours to update. Within 48 hours your DNS will be served off your new server, thus you can cancel that old server with that host you couldn't wait to leave.


    If you have resellers, copy all the files in /var/cpanel that reference resellers and anything ending in .accts to the new server.

    GOOD LUCK! If ANY setup does not make sense to you I would suggest that you do some research or ask for some help before jumping in.
    Last edited by elleryjh; 08-01-2006 at 08:50 AM.

  2. #2
    Registered Member
    Join Date
    Apr 2003
    Posts
    277

    Default

    I'm planning a server move for the 2nd week of Feb.

    Anyone know how complete this guide is? Looks great - and makes sense to me!

    Thanks for providing it here!

  3. #3
    Registered Member
    Join Date
    Nov 2002
    Location
    India
    Posts
    1,801
    cPanel/WHM Access Level

    DataCenter Provider

    Default

    Originally posted by Devil Inside
    I'm planning a server move for the 2nd week of Feb.

    Anyone know how complete this guide is? Looks great - and makes sense to me!

    Thanks for providing it here!
    The guide sud work. Incase you have shared ips for all customers then it sud allow you a smooth transfer. Incase you have doubts and not clear on things, it better at times to hire someone to do it for you.
    :: Anand ::

    ssh root@
    who the hell is root ???

  4. #4
    Registered Member
    Join Date
    Apr 2003
    Posts
    277

    Default

    Thanks for the reply.

    Everything seems clear - but I'll definitely have someone to help who knows more than I do.


  5. #5
    Registered Member
    Join Date
    Nov 2002
    Location
    India
    Posts
    1,801
    cPanel/WHM Access Level

    DataCenter Provider

    Thumbs up

    Originally posted by Devil Inside
    Thanks for the reply.

    Everything seems clear - but I'll definitely have someone to help who knows more than I do.

    np, netime.
    :: Anand ::

    ssh root@
    who the hell is root ???

  6. #6
    Registered Member
    Join Date
    Feb 2003
    Posts
    76

    Default

    We had our own admin do the entire move. We were able to transfer close to 800 accounts onto a new server without any noticeable downtime. Both our machines were in the same DC. So our tech was able to move all data .. sync it a couple of times, then switch IPs for all the domains and voila.. the sites were served off the new server !

  7. #7
    Registered Member
    Join Date
    Jan 2004
    Posts
    27

    Default

    How about transferring from a reseller account to a dedicated server?

  8. #8
    Registered Member
    Join Date
    Nov 2002
    Location
    India
    Posts
    1,801
    cPanel/WHM Access Level

    DataCenter Provider

    Default

    Originally posted by yuga
    How about transferring from a reseller account to a dedicated server?
    can be done easily if the reseller account has dns editing feature inside whm. (note i am not saying it can't be done without this feature, it just becomes easy). Modify the zone files through whm for all domains to point to new server, copy the data meanwhile to the new server. Restart the services on the new server and sites should start working. You should have the proper nameservers setup on the new server. Meanwhile shift the nameserver ips at the registrar.

    very crude explanation but there is more work in this to be done. Incase you feel you have doubts / can't do it, hire someone to do it for u.
    :: Anand ::

    ssh root@
    who the hell is root ???

  9. #9
    Registered Member
    Join Date
    Sep 2002
    Location
    Europe
    Posts
    285

    Default Re: Guide for transferring all accounts to a new server

    Transfer completed. Sites are functioning on new server, now transfer the nameservers! Here we go:
    Be sure to set up your NEW nameservers on the NEW server (see setting up nameserver). WHM will only add an A record for the oldips (until you transfer the nameservers with the registrar) so you need to edit the DNS zone to reflect the new ips.
    [/QUOTE]

    Are we talking about old nameservers IP change and transferred to new server ?

    I mean, I need to stay with present nameservers as it will be nearly imposiblle to add completely new nameservers and change all those domains to point to some new servers.

  10. #10
    Registered Member
    Join Date
    Sep 2002
    Location
    Europe
    Posts
    285

    Default

    Is it possible to move in this simple way:

    1. Set news server up with nameservers like old one but with new IPs

    2. Transfer all accounts from old server to new one

    3. Change nameservers IPs in domain registrar where domain used for nameserver is.
    This will turn off old server

    4. Delete old server accounts, abandon server

    ??????

  11. #11
    Registered Member
    Join Date
    Jan 2003
    Posts
    31

    Default

    Originally posted by dxer
    Is it possible to move in this simple way:

    1. Set news server up with nameservers like old one but with new IPs

    2. Transfer all accounts from old server to new one

    3. Change nameservers IPs in domain registrar where domain used for nameserver is.
    This will turn off old server

    4. Delete old server accounts, abandon server

    ??????
    I was thinking the same thing... can this work?

  12. #12
    Registered Member cPanel Partner NOC Badge DWHS.net's Avatar
    Join Date
    Jul 2002
    Location
    LA, Costa RIca
    Posts
    1,417
    cPanel/WHM Access Level

    Root Administrator

    Default

    That's how we do it, it's easy unless the transfer tool doesn't work.

  13. #13
    Registered Member
    Join Date
    Apr 2003
    Posts
    479

    Default

    Yes that works, but then there are 24-28 hours where email is delivered to old server that is not copied to new server and clients who don't check might never see it. Same is true for databases, ftp changes, etc.

    In the way I described above, customers won't loose any email or changes because the old server points to the new one.

  14. #14
    Registered Member cPanel Partner NOC Badge DWHS.net's Avatar
    Join Date
    Jul 2002
    Location
    LA, Costa RIca
    Posts
    1,417
    cPanel/WHM Access Level

    Root Administrator

    Default

    I forgot about that, great point.

    That is a disaster waiting to happen.

  15. #15
    Registered Member
    Join Date
    Sep 2002
    Location
    Europe
    Posts
    285

    Default

    Please help me with following.
    I had to asign nameserver IPs on the new server, manually, because server was displaying that nameservers already have IPs on old server.

    I went to edit /etc/namerserverips and assigned the nameserver new IPs.
    Then I went to WHM -Edit setup and there I hit Add an A entry for primary and secondary nameservers. This procedure went well but the problem is that no DNS zone for nameservers was created.

    What now , do I have to wait sometime or what ?

    One more thing. At what point I need to start BIND on new server ?

Page 1 of 5 123 ... LastLast

Similar Threads

  1. Replies: 7
    Last Post: 02-21-2012, 02:04 AM
  2. Transferring ACCOUNTS FROM OLD TO NEW SERVER!
    By logikstudios in forum cPanel & WHM Discussions
    Replies: 22
    Last Post: 06-04-2010, 09:39 PM
  3. Question about transferring accounts from another server
    By RTCruiser in forum cPanel & WHM Discussions
    Replies: 2
    Last Post: 08-26-2006, 03:30 PM
  4. Replies: 6
    Last Post: 04-29-2006, 07:26 AM
bargain