Methods to transfer large accounts

outpostmm

Member
Dec 3, 2008
23
0
51
Hello,

We have several WHM servers, and we need to transfer some accounts from one of our servers to another. They're all in the same physical cabinet, with the same LAN, using the same WAN interface on the router. The servers all back up to a NAS device that every server has access to. The LAN is either a 1gbps or 10gbps LAN, the WAN interface is a 1gbps connection.

The largest account we need to move has a compressed backup file that's about 220GB. I'm trying to figure out the methods that we can use to transfer the account with minimal downtime.

One method is obviously the transfer tool. The transfer tool eventually uses rsync, is that correct? Is there a time estimate on how long it's going to take to transfer an account with a backup set that's 220GB? Most of that is files, the database is about 70GB when exported using mysqldump.

Is it possible for the new (destination) server to mount the same backup location as the old (source) server, and restore the account from the backup created by the other server? This is what I'm currently testing, but the backup restore page has shown "pending" for about 20 hours, and I can't find any log files with any other information. If I run top, I don't see any backup or restore processes running. I was thinking that we could just restore the account, then later when it's time to make the switch we could rsync to transfer any changed files, and then export/import the database. I did disable the backup on the new server, so that the new server isn't going to try to back up in the same location as another server, but the restore process still let me pick the account and date and start it.

The other alternative is just to do it manually: set up a new account on the new server, use rsync to copy all of the files from the old server, and export/import the database. This is the least-preferred option, because I'd like to have the actual account and settings restored, not just the files. Things like cron jobs, database users, mail accounts, etc.

Are there any other options? We're trying to minimize downtime for the client, which is why it was attractive to just use rsync to manually copy the files. Would using the transfer tool interfere with uptime on the existing site? This is a large PHP application that does a lot of database work. Is there a way I can find out if my restore task is actually still in process, or has failed? The status is "pending," so I don't have an option in the UI to look at log files for it.

Thanks
 

andrew.n

Well-Known Member
Jun 9, 2020
518
138
43
EU
cPanel Access Level
Root Administrator
Using the transfer tool in WHM and live transfer aka express transfer you can do the transfer seamlessly and once this is completed the website will be automatically forwarded to the new server. With such a big account before the transfer you should definitely increase the timeout value to a higher one. If you have local gigabit connection then the transfer itself should be fast however zipping and extracting the account could take a bit :( (that depends on the CPU and the drives you have)

I think the best way would be transfer tool as manually moving the files could be messy especially with databases, email accounts etc etc..
 

ffeingol

Well-Known Member
PartnerNOC
Nov 9, 2001
586
182
343
cPanel Access Level
DataCenter Provider
On a side note (with any rsync tool you use) if you have a large number of little files (think mailboxes in mdir format) that can take a very long time. It does not matter how fast your connection is, rsync is slow with lots of little files.

The next limiting factor will be the speed of the drives in the two servers.
 
  • Like
Reactions: andrew.n

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
4,151
523
273
cPanel Access Level
Root Administrator
I like all of the thoughts provided here. Transfer Tool does use rsync, but if you already have a compressed backup of the account you'd like to move you could manually move just that file over with rsync and perform a restore through WHM >> Restore a Full Backup/cpmove file.

If you have questions on anything that hasn't been covered just let me know!
 

outpostmm

Member
Dec 3, 2008
23
0
51
Is that referring to the Transfer or Restore a cPanel Account tool? All I would have to do is copy the backup file to /home or /root, or others, correct?
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
4,151
523
273
cPanel Access Level
Root Administrator
If you copy the file to /home, that's where you'd want to use the Restore a Full Backup/cpmove file" tool. More details on that can be found here:


Transfer tool actually moves the data over for you as well, although you may want to explore the options it has for moving server configuration settings as well:

 

outpostmm

Member
Dec 3, 2008
23
0
51
OK, it looks like that interface was removed in WHM 90, and we're running a later version. The note on the top of that page says it was the one I was looking at. I'll copy the file from the backup NAS to the local filesystem and give that tool a shot.