Home

Have you ever needed to rebuild a server from WHM/cPanel backups?

We have – and recently with WHM/cPanel version 11.38, they’ve included system files as well.  These are backed up in the /backup/$DATE/system directory and should have everything you need to make a clone of your current server – settings and all.

Before you run this script, I’d like to tell you that you really should know enough to be able to read through it and see what its doing.  It does three things:

  1. Restores the system directories located in /backup/$DATE/system/dirs/ directory
  2. Restores the system files located in /backup/$DATE/system/files/ directory
  3. Restores all of the accounts in the /backup/$DATE/accounts/ directory

You can comment out any one of these sections in the file if you only want to do 1 or 2 of the 3 functions.

You also want to make sure the target server is running the same version of software that your old server was – especially the main operating system version because file locations may change from version to version.

If you have any questions on the script, please feel free to comment.