
04-15-2004, 12:20 PM
|
|
Web Hosting Master
|
|
Join Date: Apr 2003
Location: New Jersey USA
Posts: 898
|
|
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
|
|
WHT Addict
|
|
Join Date: Feb 2003
Posts: 105
|
|
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
|
|
Web Hosting Master
|
|
Join Date: Jun 2003
Location: UK
Posts: 6,566
|
|
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
__________________
Rus Foster - Managing Director
VPS.net - Cloud Hosting At Its Finest - 21 locations and growing!
VPNHQ - Come get yourself a lovely VPN
|

04-15-2004, 12:42 PM
|
|
Web Hosting Master
|
|
Join Date: Apr 2003
Location: New Jersey USA
Posts: 898
|
|
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
|
|
Web Hosting Master
|
|
Join Date: Jun 2003
Location: UK
Posts: 6,566
|
|
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
__________________
Rus Foster - Managing Director
VPS.net - Cloud Hosting At Its Finest - 21 locations and growing!
VPNHQ - Come get yourself a lovely VPN
|

04-16-2004, 12:41 AM
|
|
Retired Moderator
|
|
Join Date: Jul 2002
Location: Kuwait
Posts: 10,572
|
|
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 
|

04-16-2004, 12:45 AM
|
|
Web Hosting Master
|
|
Join Date: Aug 2002
Posts: 636
|
|
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
|
|
Newbie
|
|
Join Date: Apr 2004
Posts: 8
|
|
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
|
|
Web Hosting Master
|
|
Join Date: Apr 2003
Location: New Jersey USA
Posts: 898
|
|
Quote:
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.
|

04-16-2004, 08:32 AM
|
|
Web Hosting Master
|
|
Join Date: Apr 2003
Location: New Jersey USA
Posts: 898
|
|
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
|
|
Retired Moderator
|
|
Join Date: Jul 2002
Location: Kuwait
Posts: 10,572
|
|
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.
|

04-16-2004, 11:37 AM
|
|
Web Hosting Master
|
|
Join Date: Apr 2003
Location: New Jersey USA
Posts: 898
|
|
I'm not concern about server config files. Just accounts. The new server has already been config.
|

04-16-2004, 12:34 PM
|
|
Web Hosting Master
|
|
Join Date: Nov 2000
Location: UK
Posts: 2,721
|
|
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.
__________________
Matt Freeman - Reassuringly cynical and controversial - @nonuby
|

04-16-2004, 12:43 PM
|
|
Web Hosting Master
|
|
Join Date: Apr 2003
Location: New Jersey USA
Posts: 898
|
|
Well I guess we will see if Nick fixed it very soon. 
|

04-16-2004, 01:48 PM
|
|
Nose runs, feet smell?
|
|
Join Date: Feb 2002
Location: Vestal, NY
Posts: 1,343
|
|
Quote:
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 Check out our new picture gallery!
"Smarter, Cheaper, Faster" - SMB, Reseller, VDS, Dedicated, Colo hosting done right.
Los Angeles, CA (Peer 1) ZERO DOWNTIME and Scranton, PA 99.9% Uptime Dedicated and Colo.
**http://h4y.us** Voice: (866)435-5642. *** Email: askus at host4yourself d0t com
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
| Postbit Selector |
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|
| Login: |
|
|
| Advertisement: |
|
|
| Web Hosting News: |
|
|
|