Tricky Migration - Can Anybody Help?

blueandwhiteg3

Registered
May 2, 2005
2
0
151
I'm all setup with a VPS server account with CPanel and WHM. It's great technically and functionally, but I'm trying to migrate over from a CPanel/WHM reseller account in a shared environment and having trouble.

I have CPanel/WHM on the VPS, and CPanel/WHM on my old host. But I don't have root/sudo access on that machine, and they recently disabled shell access (part of why I'm leaving them) for all my accounts. I have maybe a dozen CPanel accounts, with MySQL, add-on domains, mail accounts, you name it.

I'm having a hard time getting my stuff pulled over for a few reasons. Please excuse my ignorance, but I have done some searching related to this topic and have not had a lot of luck as of yet. Here's the issues that I'm seeing:

1) My connection is not terribly fast, so HTTP posting 400 MB is a bit on the slow side. (Try the greater part of a day)

2) The CPanel backup/restore GUI seems a little limited. I can do a "Full Backup" but there is no "Full Restore" option, as far as I can tell. Testing it with a 400 MB tarball would take a while, based on my connection.

3) I can push a "Full Backup" from my old CPanel account to my new one (400 MB in just a few moments), but there's no way to "apply" it as far as I can tell, aside from untarring and trying to figure out how to place all the information and settings. I would have to manually re-load MySQL stuff (which would be OK), but I have no idea about all the other settings - mail, add-on domains, etc. Is there a "checklist" or tutorial on how to manually restore all this - things not restored by restoring the home directory, etc? I really need to catch *everything* here.

4) Doing the "Copy an account from another server with account password" almost works. A handful of my accounts could be transferred with this technique, some of them requiring a second try. But most of my accounts have errors. (See transcript at end). It seems to be checksum-related. I can't seem to find the script that controls this on my server, or I would eliminate the checksum verification and see what happens.

5) Moving the entire set of accounts over in one swipe using WHM is impossible, due to my lack of a root or sudo account on the remote machine. I don't even have SSH anymore.

Can anybody give me some suggestions to as to the simplest CPanel migration technique? I am having a bit of a challenging time, and while I could in theory do it manually, it would be 1) time consuming (which I guess would be OK) and 2) error-prone (this is the real problem - what if I forget something important? Or mis-configure something? My clients would not be happy.)

Here's some sample errors from #4 attempts:

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

Attempting to copy philium from ftp.philium.org
Attempting to login as philium to ftp.philium.org via ftp
Login ok
Uploading Htaccess
Uploading Wrapper
Uploading Dectector
Uploading Packager
Uploading Downloader
Uploading Killer
chmoding scripts
Found uid to be: 32761
Compiling wrapper
uploading wrapper
chmodding wrapper
Closing FTP Control
Packing Account using suexec method

pkgacct started.
pkgacct version 3.1 - running with uid 32761
using time::hires for speedups
Copying Reseller Config...Done
Copying SSL Certificates, CSRS, and Keys...Done
Copying Mail files....Done
Copying frontpage files....Done
Copying proftpd file....Done
Copying www logs.............
...............
Done
Grabbing mysql dbs............
Done
Grabbing mysql privs...Done
Copying mailman lists....Done
Copying mailman archives....Done
Copying homedir.............
...............
...............
Done
Copying cpuser file.......Done
Copying crontab file.......Done
Copying quota info.......Done
Storing Subdomains....
Done
Storing Parked Domains....
Done
Storing Addon Domains....
Done
Copying password.......Done
Copying shell.......Done
pkgacctfile is: /tmp/cpmove-philium.tar.gz
Creating Archive .............
Done
FOUND MD5 to be : b5aa64430064f399257082e52e3bc71f
md5sum is: b5aa64430064f399257082e52e3bc71f
DOWNLOAD READY in /tmp/cpmove-philium.tar.gz
Downloading Tarball
Removing Scripts using suexec method

UNLINKED
Checksum Failure [[d41d8cd98f00b204e9800998ecf8427e]] [[b5aa64430064f399257082e52e3bc71f]]...trace information follows...
HTTP/1.1 200 OK
Date: Mon, 02 May 2005 13:16:47 GMT
Server: Apache/1.3.33 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.3.10 FrontPage/5.0.2.2635 mod_ssl/2.8.22 OpenSSL/0.9.7a
Connection: close
Content-Type: text/html

pkgacct started.
pkgacct version 3.1 - running with uid 32761
using time::hires for speedups
Copying Reseller Config...Done
Copying SSL Certificates, CSRS, and Keys...Done
Copying Mail files....Done
Copying frontpage files....Done
Copying proftpd file....Done
Copying www logs.............
...............
Done
Grabbing mysql dbs............
Done
Grabbing mysql privs...Done
Copying mailman lists....Done
Copying mailman archives....Done
Copying homedir.............
Done
Copying cpuser file.......Done
Copying crontab file.......Done
Copying quota info.......Done
Storing Subdomains....
Done
Storing Parked Domains....
Done
Storing Addon Domains....
Done
Copying password.......Done
Copying shell.......Done
pkgacctfile is: /tmp/cpmove-philium.tar.gz
Creating Archive .............
Done
md5sum is: b5aa64430064f399257082e52e3bc71f
DOWNLOAD READY in /tmp/cpmove-philium.tar.gz


Error while copying account...! Aborting Extraction

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

Another error:

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

Attempting to copy wakes from ftp.wakesdriving.com
Attempting to login as wakes to ftp.wakesdriving.com via ftp
Login ok
Uploading Htaccess
Uploading Wrapper
Uploading Dectector
Uploading Packager
Uploading Downloader
Uploading Killer
chmoding scripts
Found uid to be: 32903
Compiling wrapper
uploading wrapper
chmodding wrapper
Closing FTP Control
Packing Account using suexec method

pkgacct started.
pkgacct version 3.1 - running with uid 32903
using time::hires for speedups
Copying Reseller Config...Done
Copying SSL Certificates, CSRS, and Keys...Done
Copying Mail files....Done
Copying frontpage files....Done
Copying proftpd file....Done
Copying www logs.............
...............
Done
Grabbing mysql dbs............
Done
Grabbing mysql privs...Done
Copying mailman lists....Done
Copying mailman archives....Done
Copying homedir.............
Done
Copying cpuser file.......Done
Copying crontab file.......Done
Copying quota info.......Done
Storing Subdomains....
Done
Storing Parked Domains....
Done
Storing Addon Domains....
Done
Copying password.......Done
Copying shell.......Done
pkgacctfile is: /tmp/cpmove-wakes.tar.gz
Creating Archive .............
Done
FOUND MD5 to be : aad0984506932b7f494af52aa08b4811
md5sum is: aad0984506932b7f494af52aa08b4811
DOWNLOAD READY in /tmp/cpmove-wakes.tar.gz
Downloading Tarball
Removing Scripts using suexec method

UNLINKED
Checksum Failure [[d41d8cd98f00b204e9800998ecf8427e]] [[aad0984506932b7f494af52aa08b4811]]...trace information follows...
HTTP/1.1 200 OK
Date: Mon, 02 May 2005 13:15:41 GMT
Server: Apache/1.3.33 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.3.10 FrontPage/5.0.2.2635 mod_ssl/2.8.22 OpenSSL/0.9.7a
Connection: close
Content-Type: text/html

pkgacct started.
pkgacct version 3.1 - running with uid 32903
using time::hires for speedups
Copying Reseller Config...Done
Copying SSL Certificates, CSRS, and Keys...Done
Copying Mail files....Done
Copying frontpage files....Done
Copying proftpd file....Done
Copying www logs.............
...............
Done
Grabbing mysql dbs............
Done
Grabbing mysql privs...Done
Copying mailman lists....Done
Copying mailman archives....Done
Copying homedir.............
Done
Copying cpuser file.......Done
Copying crontab file.......Done
Copying quota info.......Done
Storing Subdomains....
Done
Storing Parked Domains....
Done
Storing Addon Domains....
Done
Copying password.......Done
Copying shell.......Done
pkgacctfile is: /tmp/cpmove-wakes.tar.gz
Creating Archive .............
Done
md5sum is: aad0984506932b7f494af52aa08b4811
DOWNLOAD READY in /tmp/cpmove-wakes.tar.gz


Error while copying account...! Aborting Extraction
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,450
31
473
Go on, have a guess
As you've probably already realised, the connection is likely to be timing out - the migration script is not great at copying large amounts of data (especially over a slow link) reliably.

Here's what you can do:

1. Create cPanel Full Backups of the accounts (you have to do one at a time), it's probably easier to have them created locally if you have the space, otherwise you'll have to have the FTP'd over somewhere.

2. Put the backup file into /home on your new server and extract it:

tar -xzf backup-xxxx-accountname.tar.gz

3. Rename the newly created backup-xxxx-accountname/ to:

mv backup-xxxx-accountname/ cpmove-accountname/

4. Tar up the renamed directory:

tar -czf cpmove-accountname.tar.gz cpmove-accountname/

5. Restore the account with:

/scripts/restorepkg accountname

6. Tidy up the files in /home

rm -Rf /home/cpmove-accountname*
rm -Rf /home/cprestore/

It's messy but it should get your accounts back up. If anyone else has a cleaner method, do chime in ;)
 

blueandwhiteg3

Registered
May 2, 2005
2
0
151
I figured out an easier way! Perhaps this will help somebody:

1) In CPanel on the host I'm migrating away from, I used the send to remote server via SCP function and sent the tarballs to /home for each CPanel account I wanted to pull over.

2) In WHM on the host I'm migrating to, I simply used "Restore a Full Backup/cpmove file" under Backup, entering in the username I wanted to restore.

3) There is no #3! You're done.

You don't have to rename the tarballs or move them. You don't have to setup the accounts before restoring. You don't have to do anything except steps 1 and 2 for EVERYTHING to come over! Even the settings (quote/bandwidth/etc). WHM even "cleans up" after itself and deletes the tarballs once they're untarred and in place. The only issue I ever found was that a few (some, but not all) add-on domains got messed up in the transfer process.

This is SO easy. I wish I had known about this before spending hours messing around.

In the future, if I have a number of accounts, I'll write a PHP script to handle this automatically. It would be a pretty simple adaptation of my web spider code! (I'm surprised that CPanel doesn't have a script that does this automatically. It would be quite easy, and secure and efficient if SCP is available.)
 

Infopro

Well-Known Member
May 20, 2003
17,091
516
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
chirpy said:
As you've probably already realised, the connection is likely to be timing out - the migration script is not great at copying large amounts of data (especially over a slow link) reliably.

Here's what you can do:

-snipped-

Thanks chirpy, once again. Had a problem tonight with a small account for unknown reasons but this worked fine.
 

andyorourke

Member
Dec 17, 2003
23
1
153
UK
:) :)
Another quite easy way I just discovered after days of messing around:

In WHM, go to the "Transfers" menu

Select the "Copy an account from another server with account password"

Fill in the form (IP of remote server, domain name, account name, account password)

click the button

Hey Presto, your done!

Best Wishes
Andy
 

Cognigens

Registered
Feb 20, 2003
1
0
151
andyorourke said:
:) :)
Another quite easy way I just discovered after days of messing around:

In WHM, go to the "Transfers" menu

Select the "Copy an account from another server with account password"

Fill in the form (IP of remote server, domain name, account name, account password)

click the button

Hey Presto, your done!

Best Wishes
Andy
think, the problem with this function as highlighted by blueandwhiteg3 is that this tranfer script doesn't do well with add-on/parked domains on server the account is to be transferred from. (these parked/add-on domains won't appear correctly on cpanel/whm list, while at the same time, you cannot manually add them later -- will be prompted as already exist instead).

i'm in exactly in the same situation with blueandwhiteg3 (a year later ;-)), transferring account from

WHM 10.8.0 cPanel 10.8.1-R113
CentOS 4.3 i686 - WHM X v3.1.0

to

WHM 10.8.0 cPanel 10.8.2-R83
Fedora i686 - WHM X v3.1.0

hope full backup/restore method would work... will try now. not sure if SCP would work though...
 

wkdwich

Well-Known Member
Apr 11, 2005
105
0
166
I'm in the middle of this also right now.. moving from a VPS to a dedicated, both Fedora Core, the VPS was 2 the dedicated is 4, both with cpanel

I resolved the parked not showing in the CP very simply.. the transfer using: Copy an account from another server with account password DID bring over the parked, but they would not show in the CP.. I manually edited httpd.conf to add the server alias' and restarted httpd.. they all now show in their respective homes..

The issue I am struggling with is I have several domains that refuse to move.. I have not successfully been able to transfer with any other option than: Copy an account from another server with account password.. this is the only one that works, moved 66 of 78 domains so far.. 3 of these are giving me the same error though, I probably could have just created these few domains by hand and uploaded them myself with all the time I spent trying to figure this out!

Attempting to login as linsci to 66.249.19.XX via ftp
Login ok
Uploading Htaccess
Uploading Wrapper
Uploading Dectector
Uploading Packager
Uploading Downloader
Uploading Killer
chmoding scripts
Unable to get uid of remote account...(trace information follows)...HTTP/1.1 404 Not Found
Date: Sun, 28 May 2006 05:54:55 GMT
Server: Apache/1.3.33 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.3.11 FrontPage/5.0.2.2635 mod_ssl/2.8.22 OpenSSL/0.9.7a
Connection: close
Content-Type: text/html

Sorry, the page or file you requested is not available. There could be any number of reasons for this error.

Please return to the main page of the site and try again.

Email the site administrator so they can correct the issue. Please include the following information:


I was at: somewhere.com

the link to the page noted was broken: /~linsci/cgi-bin/cpdownload/cpanelwrap.cgi?linsci

Error while copying account...! Aborting Extraction
 

wkdwich

Well-Known Member
Apr 11, 2005
105
0
166
blueandwhiteg3 said:
I figured out an easier way! Perhaps this will help somebody:

1) In CPanel on the host I'm migrating away from, I used the send to remote server via SCP function and sent the tarballs to /home for each CPanel account I wanted to pull over.

2) In WHM on the host I'm migrating to, I simply used "Restore a Full Backup/cpmove file" under Backup, entering in the username I wanted to restore.
You are a genius!! Thanks!! This resolved my issues of the transfers AND as an added bonus this particular domain has 5 parked and not only did that come over, but they showed in the CP right away!!

fabulous.. I will do the remaining ones this way..
 

wkdwich

Well-Known Member
Apr 11, 2005
105
0
166
I just wanted to give an update.. I have 2 more of a total of 8 remaining domains to transfer.. this has been wonderful.. one domain, a large one, I restored in haste.. before I received the email it was done.. hence it was not complete.. I removed the domain from the new server through the WHM, and looked to see I did get the mail it was done about 20 minutes after I did the premature restore.. I scoured the server for the file and found it, along with all the others that I transfered in this manner in /home/cprestore/ I copied the file and restored it again, now it has correctly been restored.

So the point is, after all your transfers are complete and you make the server live, and everything is working properly.. I would think it might be a good idea to remove these tar's .. the 6 I have already done take up better than 275MB the last 2 domains to go are larger then the biggest of these 6.. so that quite a big of resources being sucked away..
 

JosefPrado

Registered
wkdwich said:
I resolved the parked not showing in the CP very simply.. the transfer using: Copy an account from another server with account password DID bring over the parked, but they would not show in the CP.. I manually edited httpd.conf to add the server alias' and restarted httpd.. they all now show in their respective homes..
Hello,

I'm facing the same issue when transfering an account, the account were trnafered sucessfully, but all the parked domains are not showing.

I've founf the httpd.conf file, but i dont know exactly where and what to add the information regarding the parked domains.

Can you please help me on this?

Thanks,
 

wkdwich

Well-Known Member
Apr 11, 2005
105
0
166
The easiest way to do this would be to look at theat domains section in both the old and the new httpd.conf file.. just copy over the data missing in the new one from the old.. make sure you restart httpd when you are done
 

JosefPrado

Registered
Thanks you man,

I did it here and it worked really fine :)

Now I'm able to see all the parked domains!


But I noticed that the subdomains are not listed at all.

In fact they are listed, but as a domain, not as a subdomain.

Edited again and added the virtual host information and they appeared just like the original account :)

Thanks
 
Last edited:

mohit

Well-Known Member
Jul 12, 2005
553
0
166
Sticky On Internet
My account size is Surprisingly BIG

hi,
i wanted to move a account (approx 650MB) to a better server i have, but when i tried pkgacct for this a/c from SSH and it took nearly 30 hours to bringup this cpmove file.
And account shows, used space 600MB in WHM, but cpmove file for this is 6+ G.B.

could anyone let me know is it normal that cpmove file is bigger than the actual a/c. siz ?

and by the time i managed the backup of this a/c. the account owners, updated their online DB which is updated hundred of times a day from different place.

Iam struck, how can i move this a/c. to a new server, badly need to do this,

any hopes :)

see ya,
mohit

Update: i think i should correct my post. My box had quota problem so the 9 GB account was not shown as 9GB, first i fixed the quota then Packed the account from SSH, many folders which had pdf's i moved them before packing the account and rest all went without much problems.

thanks,
 
Last edited:

NightStorm

Well-Known Member
Jul 28, 2003
285
4
168
cPanel Access Level
Root Administrator
Twitter
Make the changes to your domain's nameservers, pointing them to the new server. This is because it can take up to 48 hours for the changes to take effect for the visitors.
Turn the domain off.
Package the httpd files seperately through SSH, and place them outside of the users home directory.
Use the migration manager. Without the files in the users public_html directory, the migration will move a lot faster, and get the domain and database onto the new box.
FTP the httpd files package from one box direct to the other through SSH. Once it's there, uncompress it back into the new public_html directory. You use direct FTP from the SSH terminal because your servers will have a faster pipe direct between them, than for you to manually move it on your own bandwidth.
Change your domain's "A" records on the old server so that they point to the new server instead. This will direct people to the new server until the nameserver changes have taken effect.

At least, this is what I had to go through. But my domain was just shy of 2gb, and the migration was taking AGES, because it was having to package up the entire html directory then deal with it remotely. If you're really concerned about database changes, simply turn the domain off until it's done. Put up a message saying it's unavailable temporarily while you move it to a faster box. You'll find that the nameserver changes are going to take longer than the migration ever would anyway. Besides, you can always grab a database backup seperately after everything is moved, through the cPanel/Backup section.

One other option is to generate a full backup, and FTP it over. Turn the domain off (to prevent SQL changes), generate the backup (save it to /home). Then through SSH, FTP that backup over to /home on the new box and run a full restore. Once the backup is generated, you can turn the domain back on, and simply grab the database backup later, once the nameserver and DNS changes are made to point to the new box.
 
Last edited:

mohit

Well-Known Member
Jul 12, 2005
553
0
166
Sticky On Internet
Re:

hi NightStorm,
only catch in this move is i can't turn the domain off.

anyone with a better idea ?

see ya,
mohit
 

Metro2

Well-Known Member
May 24, 2006
522
74
178
USA
cPanel Access Level
Root Administrator
As you've probably already realised, the connection is likely to be timing out - the migration script is not great at copying large amounts of data (especially over a slow link) reliably.

Here's what you can do:

1. Create cPanel Full Backups of the accounts (you have to do one at a time), it's probably easier to have them created locally if you have the space, otherwise you'll have to have the FTP'd over somewhere.

2. Put the backup file into /home on your new server and extract it:

tar -xzf backup-xxxx-accountname.tar.gz

3. Rename the newly created backup-xxxx-accountname/ to:

mv backup-xxxx-accountname/ cpmove-accountname/

4. Tar up the renamed directory:

tar -czf cpmove-accountname.tar.gz cpmove-accountname/

5. Restore the account with:

/scripts/restorepkg accountname

6. Tidy up the files in /home

rm -Rf /home/cpmove-accountname*
rm -Rf /home/cprestore/

It's messy but it should get your accounts back up. If anyone else has a cleaner method, do chime in ;)

There might be newer methods etc..., but I found this post quickly in a search and it just saved my butt. I had to copy multiple accounts to a new sever recently, and one account was just too big and was taking forever / kept timing out in WHM > Copy Account feature

This method still took a long time, but it actually *worked* and the site is now running fine on the new box.

Thank you!!