mpope2

Well-Known Member
Feb 8, 2002
73
0
306
I've been doing a couple of server to server transfers using the &copy multiple accounts& function. Whenever the site gets over to the new server, the Databases are always screwed up. I saw a thing in WHM news that said &all known database problems with server transfers have been fixed&, so perhaps I have a new bug?

Server 1 is running WHM 4.7 (latest build), red hat 7.1. Server 2 (transfering account TO this server) is running WHM 4.7 latest build, red hat 7.2.

Both servers are on the same LAN, connected to the same hub. Everything in the account copier appears to work correctly (there are no errors).

Any suggestions? Also, how would I go about manually transferring the databases, and making sure the permissions, etc. get setup correctly?

Thanks!
 

bert

Well-Known Member
Aug 21, 2001
593
0
316
If the source and target servers don't have any databases, you can just copy the entire directory /var/lib/mysql and that will move all your databases, database users and passwords. Just make sure you shut down mysql before moving the content, the best possible way is to just tar up the directory, send it via scp and then untar it.

I personally prefer to move servers by hand. I have found many bugs and problems with the account copy function of WHM. I have moved two servers in the past week or so all by hand (about 150 accounts each) in about 3 to 4 hours without any problems. ;)
 

mpope2

Well-Known Member
Feb 8, 2002
73
0
306
I'm not moving the entire server, just a couple of sites on one server over to another. Not sure how many sites I will have to move... just enough to lessen the load a little.

How would I manually move an individual database, usernames, and passwords?

The cpanel account mover works great if there are no databases. Unfortunately, all of the sites I want to move use databases (murphy's law I guess)...
 

bert

Well-Known Member
Aug 21, 2001
593
0
316
If there are databases already in /var/lib/mysql, then you can't of course move the whole directory.

What I do in these cases is login to the specific account cpanel to take a look at the databases and database users in use, I then search in their home directories for files that would provide me with the mysql password, if I can't find the password I then contact the customer involved and ask him/her to provide us with the password for the database user.

You can then simply dump and compress the database on the source server, move it to the target server and then restore it there. You will have to manually recreate the database users and passwords from cpanel on the target server. This is so far (to my knowledge) the only thing you can do.