Results 1 to 21 of 21
-
04-15-2004, 12:20 PM #1Web Hosting Master
- 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.
-
04-15-2004, 12:29 PM #2WHT Addict
- 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.
-
04-15-2004, 12:41 PM #3Web Hosting Master
- 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
RusRuss Foster - Industry Curmudgeon
Freelance Sysadmin for Hire - email vaserv@gmail.com
-
04-15-2004, 12:42 PM #4Web Hosting Master
- 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?
-
04-15-2004, 12:45 PM #5Web Hosting Master
- 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
RusRuss Foster - Industry Curmudgeon
Freelance Sysadmin for Hire - email vaserv@gmail.com
-
04-16-2004, 12:41 AM #6Retired Moderator
- 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 waitBashar 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
-
04-16-2004, 12:45 AM #7Web Hosting Master
- 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.
-
04-16-2004, 06:53 AM #8Newbie
- Join Date
- Apr 2004
- Posts
- 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.
-
04-16-2004, 08:30 AM #9Web Hosting Master
- 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.
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.
-
04-16-2004, 08:32 AM #10Web Hosting Master
- 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?
-
04-16-2004, 11:02 AM #11Retired Moderator
- 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
-
04-16-2004, 11:37 AM #12Web Hosting Master
- 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.
-
04-16-2004, 12:34 PM #13Web Hosting Master
- 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..
-
04-16-2004, 12:43 PM #14Web Hosting Master
- Join Date
- Apr 2003
- Location
- New Jersey USA
- Posts
- 897
Well I guess we will see if Nick fixed it very soon.
-
04-16-2004, 01:48 PM #15Web Hosting Master
- 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.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
-
04-16-2004, 02:32 PM #16Retired Moderator
- 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
-
04-16-2004, 03:01 PM #17Web Hosting Master
- 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..
-
04-16-2004, 04:50 PM #18Web Hosting Master
- 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 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 haveH4Y 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
-
04-16-2004, 04:56 PM #19Web Hosting Master
- 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
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.
-
04-16-2004, 05:04 PM #20Retired Moderator
- 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
-
04-16-2004, 07:12 PM #21Web Hosting Master
- 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.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