Results 1 to 21 of 21
  1. #1
    Join Date
    Apr 2003
    Location
    New Jersey USA
    Posts
    897

    Transfer over 300+ accounts from cpanel to cpanel help

    I've used the WHM transfer accounts from server to server but had a nightmare when alot of the accounts transfer add-on domains and sub-domains stop working.

    Does anyone know of a script that utilizes /scripts/pkgacct username that can run and create all of them and then I can download all of the backups or the script will send to the other server?

    Of course I could do /scripts/pkgacct username but I need this done in the next 24 hours and won't have time to do each one individually.

    Your help is very appreciated.

  2. #2
    Join Date
    Feb 2003
    Posts
    110
    I moved 800 accounts and I had a similar problem.
    The addons and parked domains remained pointing to the old server.
    I had to delete one by one and recreate all the parked an addons, because I didīt find any scripts to fix.

  3. #3
    Join Date
    Jun 2003
    Location
    UK
    Posts
    6,616
    We do something like the following. From the shell

    for a in /home* ; do
    cd $a
    for i in * ; do

    /scripts/pkgacct $i

    done
    done

    This will just step through every user and make the pkgacct

    The you can use something similar to restore them

    Rus
    Russ Foster - Industry Curmudgeon
    Freelance Sysadmin for Hire - email vaserv@gmail.com

  4. #4
    Join Date
    Apr 2003
    Location
    New Jersey USA
    Posts
    897
    Rus,

    Are you saying running this in shell:

    /scripts/pkgacct $i

    Will create the cpbackup files for all accounts or just the ones starting with I?

  5. #5
    Join Date
    Jun 2003
    Location
    UK
    Posts
    6,616
    You need to do it in the for loop as that will make $i become every user name. You could also do

    cut -d\: -f1 /etc/passwd | while read account ; do /scripts/pkgacct $account ; done

    Basic simple shell script

    Rus
    Russ Foster - Industry Curmudgeon
    Freelance Sysadmin for Hire - email vaserv@gmail.com

  6. #6
    Join Date
    Jul 2002
    Location
    Kuwait
    Posts
    10,620
    this will mess things up which will read system users.

    try for accounts in `ls /var/cpanel/users` ; do /scripts/pkgacct $accounts ; done

    this will create cpmove-login.tar.gz in /home for all logins where u can move them to the second server into /home then /scripts/restorepkg $LOGIN

    replace $LOGIN with the login u want to restore

    to automate the restoration put a text file in /home/list.txt including all accounts names something like ls /var/cpanel/users > /home/list.txt (on the old account) and move it to the new account and do
    for accounts in `cat /home/list.txt`; do /scripts/restorepkg $accounts ; done

    make your self cup of tea and wait
    Bashar Al-Abdulhadi - KuwaitNET Internet Services Serving customers since 1997
    Kuwait's First Webhosting and Domain Registration provider - an ICANN Accredited Registrar

    Twitter: Bashar Al-Abdulhadi

  7. #7
    Join Date
    Aug 2002
    Posts
    645
    Wait... are you saying you already did the move? Addon domains have nothing to do with rebatching them again for a download. This will only duplicate the problem. The problem consists in the httpd.conf file and I can point you right to the problem. All it takes is about 20 minutes to learn the technique and you can fix the problem and avoid transfering everything over again... that is just a mess and, again, will result in the same results.

    Contact me at admin@ecphosting.net for more information.

  8. #8

    My solution

    I had similar problem in the past.

    All I did to solve this problem was to update all zone files on the new server that had the old server IP in them.

    It was just a simple script I wrote, it looked up all zone files (*.db) in the /var/named directory, looked for any with old server IP addresses in them and then replaced them with new server IP address - worked fine for me.

    I wouldn't re-add domains manually from Cpanel - I had a client try to do this and it stuffed up his sites - I had to edit httpd.conf to remove what he did.
    Last edited by illum; 04-16-2004 at 06:58 AM.

  9. #9
    Join Date
    Apr 2003
    Location
    New Jersey USA
    Posts
    897
    Originally posted by EcpHosting
    Wait... are you saying you already did the move? Addon domains have nothing to do with rebatching them again for a download. This will only duplicate the problem. The problem consists in the httpd.conf file and I can point you right to the problem. All it takes is about 20 minutes to learn the technique and you can fix the problem and avoid transfering everything over again... that is just a mess and, again, will result in the same results.

    Contact me at admin@ecphosting.net for more information.
    Hey Bud,

    I haven't moved them yet. Basically this is the mess I have.

    I took 3 servers and combined them into one xeon server. I switch to a new datacenter taking the word from a friend and it has been a nightmare. Server connection is crap and other issues arose.

    I now have a xeon at The Planet and need to move the 300 clients from the old xeon to the new xeon. When I first moved all the clients from all 3 servers to one, I used WHM move script and had serveral issues with missing SQL databases and add-ons not working.

    What I need now is a way to move the clients backups from one server to the other and have the minimum amount of troubles.

  10. #10
    Join Date
    Apr 2003
    Location
    New Jersey USA
    Posts
    897
    It looks like since I have backups on a backup drive I can do ths and move all content within the backup drive to the home folder on the new server?


    scp -r user@remote-computer:/home /backup

    From what I understand of SCP that will move all accounts from the backup folder on the old server to the /home folder on the new server.

    Is that correct?

  11. #11
    Join Date
    Jul 2002
    Location
    Kuwait
    Posts
    10,620
    you will miss so many required configuration files located in /var/cpanel /etc etc..

    unless u move home dirs then delete home dirs and move accounts from WHM which will make it smaller to move.
    Bashar Al-Abdulhadi - KuwaitNET Internet Services Serving customers since 1997
    Kuwait's First Webhosting and Domain Registration provider - an ICANN Accredited Registrar

    Twitter: Bashar Al-Abdulhadi

  12. #12
    Join Date
    Apr 2003
    Location
    New Jersey USA
    Posts
    897
    I'm not concern about server config files. Just accounts. The new server has already been config.

  13. #13
    Join Date
    Nov 2000
    Location
    localhost
    Posts
    3,771
    I had the nightmare too it, it setup the VirtualHost entry partially since you create a sub-domain when you create an add-on domain, however the restore did not add

    ServerAlias real-addon-domain.com www.real-addon-domain.com

    Boy that was fun! I email Nick about it in '03 and he said it was fixed, but not been able to test it yet.
    MattF - Since the start..

  14. #14
    Join Date
    Apr 2003
    Location
    New Jersey USA
    Posts
    897
    Well I guess we will see if Nick fixed it very soon.

  15. #15
    Join Date
    Feb 2002
    Location
    Vestal, NY
    Posts
    1,381
    Originally posted by MattF
    I had the nightmare too it, it setup the VirtualHost entry partially since you create a sub-domain when you create an add-on domain, however the restore did not add

    ServerAlias real-addon-domain.com www.real-addon-domain.com

    Boy that was fun! I email Nick about it in '03 and he said it was fixed, but not been able to test it yet.
    This problem does appear fixed. I told Nick about it a while back as well and it was news to him at that point!
    H4Y Technologies LLC .. Since 2001!!
    "Smarter, Cheaper, Faster" - SMB, Reseller, VPS, Dedicated, Colo hosting done right.

    ZERO PACKETLOSS, ZERO DOWNTIME Dedicated and Colo - USA: IA, CA, NC, OR, NV
    **http://h4y.us** **http://iwfhosting.net**
    Voice: (866)435-5642. *** askus at host4yourself d0t com

  16. #16
    Join Date
    Jul 2002
    Location
    Kuwait
    Posts
    10,620
    you mean moving accounts does not add the addon domains to httpd.conf ?!
    Bashar Al-Abdulhadi - KuwaitNET Internet Services Serving customers since 1997
    Kuwait's First Webhosting and Domain Registration provider - an ICANN Accredited Registrar

    Twitter: Bashar Al-Abdulhadi

  17. #17
    Join Date
    Nov 2000
    Location
    localhost
    Posts
    3,771
    It did miss the ServerAlias realdomain.com for the VirtualHost container, add-on domains are just sub-domains with the added directive, so they were only resetup as subdomains.
    MattF - Since the start..

  18. #18
    Join Date
    Feb 2002
    Location
    Vestal, NY
    Posts
    1,381
    Originally posted by MattF
    It did miss the ServerAlias realdomain.com for the VirtualHost container, add-on domains are just sub-domains with the added directive, so they were only resetup as subdomains.
    I said that this was fixed a few posts back and actually I am not sure if this is fixed yet. Thinking back, the problem I had was actually changing IPs on accounts with add-on domains through WHM. It would do exactly the same thing with missing the server aliases for the subdomain virtualhost entries. I have not transferred accounts with add-on domains since then but I do think Nick fixed the change IP problem, which was obviously very similar.

    I did, however, transfer many accounts w/ lots of parked domains without a problem. Previously, WHM seemed to be unable to update the DNS entries for parked domains - at least the few times I've done it. That is why I have come up with a couple scripts that can go through and change DNS entries as easily as possible.

    Moral of the story: if you are transferring 300 domains with WHM, expect a few problems, but usually it does not take much time to work out. Just come up with a collection of "fix the cPanel bugs" scripts like I have
    H4Y Technologies LLC .. Since 2001!!
    "Smarter, Cheaper, Faster" - SMB, Reseller, VPS, Dedicated, Colo hosting done right.

    ZERO PACKETLOSS, ZERO DOWNTIME Dedicated and Colo - USA: IA, CA, NC, OR, NV
    **http://h4y.us** **http://iwfhosting.net**
    Voice: (866)435-5642. *** askus at host4yourself d0t com

  19. #19
    Join Date
    Apr 2003
    Location
    New Jersey USA
    Posts
    897
    Originally posted by John[H4Y]
    Just come up with a collection of "fix the cPanel bugs" scripts like I have
    How much for it? lol...

    Well this is what I'm currently doing and seem to be going ok so far.

    - make full backups.

    - scp -r /backup/cpbackup/monthly root@11.11.111.11:/backup/cpbackup/monthly

    Once that is done, then I'll restore from WHM and see how it goes.

  20. #20
    Join Date
    Jul 2002
    Location
    Kuwait
    Posts
    10,620
    good luck
    Bashar Al-Abdulhadi - KuwaitNET Internet Services Serving customers since 1997
    Kuwait's First Webhosting and Domain Registration provider - an ICANN Accredited Registrar

    Twitter: Bashar Al-Abdulhadi

  21. #21
    Join Date
    Feb 2002
    Location
    Vestal, NY
    Posts
    1,381
    Originally posted by eMax
    How much for it? lol...

    Well this is what I'm currently doing and seem to be going ok so far.

    - make full backups.

    - scp -r /backup/cpbackup/monthly root@11.11.111.11:/backup/cpbackup/monthly

    Once that is done, then I'll restore from WHM and see how it goes.
    Yes I have done that before also and it worked out without too many problems. Have fun!
    H4Y Technologies LLC .. Since 2001!!
    "Smarter, Cheaper, Faster" - SMB, Reseller, VPS, Dedicated, Colo hosting done right.

    ZERO PACKETLOSS, ZERO DOWNTIME Dedicated and Colo - USA: IA, CA, NC, OR, NV
    **http://h4y.us** **http://iwfhosting.net**
    Voice: (866)435-5642. *** askus at host4yourself d0t com

Posting Permissions

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