I am making full backups via the backup feature in cPanel for each account and I wonder if this is enough to set up shop with a different hosting company?

I also have access to our WHM where all the accounts are listed - is there a way to make a full backup of all the accounts in there as well? It would have to be a backup that would download because my VPS server is at 83% storage capacity already.


The simple answer is yes. You can move a site or sites to another server using a cPanel backup file. The normal way to do this would be from WHM on the receiving server using the "Transfers" function, but you can also do it from the losing server side if that doesn't work.

Because I just went through what you're going through with HFW and because the wording of your question, I suspect that that's the situation you're in: The old server won't accept the transfer request from the new one. So here's how I transferred several dozen accounts out of HFW's service even though the server at HFW refused to accept the connection from the receiving server.

This method assumes some prerequisites:

  1. Both servers are running, of course.
  2. You are root on both servers.
  3. You have both root passwords.
  4. You have at least SSH to the losing server. (WHM is not needed.)
  5. Presumably, you'd have access to WHM on the new server. But you can actually restore from the shell if you need to.

The procedure is simple:

  1. Log into the losing server as root using your SSH client of choice. (I like puTTY.)

  2. cd /backup

  3. cd again to the most recent backup subdirectory. Then look in the "accounts" subdirectory.

  4. du -bsh * to see what's in there, with file sizes. The backup files will be in the format username.tar.gz. If there's already a recent-enough backup, then you don't need to make one.

  5. If there does not exist a recent-enough backup for the account you need, then make it. Rather than my wasting keystrokes, the link to how to do that is at https://documentation.cpanel.net/display/68Docs/The+pkgacct+Script . You can also restore backup files from the shell on the new machine if you want or need to. That information's in there, too.

  6. One there exist backup archives for the account(s) you need to move, use SCP to get them to the new server. You'll want to send them to /home on the new server because that's where WHM will look for them.

Assuming that the user account is somesite, that the archive is somesite.tar.gz, and that the receiving server's hostname is the.newserver.com, the SCP syntax would be:

$ scp somesite.tar.gz root@the.newserver.com:/home

You can also use the receiving server's IP rather than the hostname. Either way, once you enter the SCP command, you'll be prompted for the root password of the receiving server. Enter the password, and the transfer will start.

  1. Once the transfer is finished, go to WHM on the new machine and in the Backup section, select "Restore a Full Backup/cpmove File." Then select "Restore with Username." WHM will look in /home, find the backup, and offer to restore it for you. Unless the archive is corrupt, this almost always works quickly and flawlessly.

And that's that as far as moving the account to the new server is concerned. It doesn't change the DNS on the old server, however, so you have to make some DNS changes. What those exact changes are depend on how the two servers are configured, so more detailed information about your situation would be needed.

At a minimum, you should change the A entries on the old server to point to the site's new IP. As for the rest, more information about your situation is needed to further advise on the specifics.

Just while we're on the subject of backups, if you save your backups to Amazon S3 or some other cloud service in addition to /backup on the server itself, you can reimport the sites to a new server in a similar manner. From the new server, you'd pull the backup files to /home using whatever transfer protocol the cloud provider supports (SCP, rclone, or whatever); or push them from the cloud to /home on the new server, again using whatever supported, secure protocol the provider supports. Whichever way you do it, once the backup files are in /home on the new server, you can restore the account(s) using WHM.

The reason I say this is because I lost a ~60GB account during the HFW fiasco, but because I had a backup on S3, I was able to restore it in 19 minutes. Having a backup stored elsewhere than on the server itself allows you to restore your sites to any cPanel-equipped server in the Internet-connected world, even if your hosting company crashes and dies altogether. If you value your data, it's something I suggest you think about.

  • Thank you for an awesome easy to understand answer! BTW - I love your nickname! ;-) Couple of questions for ya - being in the same "Hostforweb meltdown" you setup an account at a different host using your backed up data at Amazon S3. Then you had to change the DNS to point to the new server - doesn't that take up to 24 hours to propagate? Wouldn't the outage in this case for some customers still be up to 24 hours? I had a quick look at Amazon S3 and it charges per GB - is that per GB transferred or stored? (Does it charge me every time I update the backup?)
    – Allysin
    Jan 6 '18 at 10:02
  • I like your idea of storing the date on-line somewhere but just for my understanding of things - would it work the same if I had a recent backup on my local hard drive and just uploaded that to the root of the new server via FTP?
    – Allysin
    Jan 6 '18 at 10:04
  • Amazon charges for both storage and data transfer. I haven't looked at their pricing in a while, but in an average month, it costs me < USD $10.00 for full backups of three servers and dozens of accounts, some of them quite large. BackBlaze B2 is a cheaper alternative for uploads and storage, but charges higher rates for downloads than uploads. They also lack cPanel integration, so you'd have to set up something like rclone from your server to BackBlaze B2. So if you never expect to actually use the backups, BackBlaze is cheaper, but also less convenient on a cPanel server. Jan 6 '18 at 11:46
  • Yes, backing up to your own desktop would also work. No matter how you get it there, once the backups are in /home on the receiving server, they can be restored. But it almost certainly would be slower to upload a large backup from your desktop than it would be to pull it from a good cloud provider. Jan 6 '18 at 11:55
  • Personally, I let the servers copy the backups to Amazon S3 because of the convenience and proven reliability. But I also maintain backups on my own desktop, which in turn is backed up to both an ioSafe disaster-proof hard drive and to BackBlaze B2 (in addition to a daily hard drive clone on an ordinary external hard drive). Yeah, I'm a backup nut. But in all my years in IT, I've never heard anyone complain about having too many good backups to choose from. Jan 6 '18 at 11:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.