Restore server settings from backup

SSy

Active Member
May 10, 2016
29
0
1
cPanel Access Level
Root Administrator
Hi there - my hard drive has crashed and I am going to have to re-install WHM. I have all the accounts backed up but also have a number of settings customized in WHM. Is there a way to restore those settings or do I have to manually do all that? Such as cloudlinux settings, packages, all that sort of stuff?

I have a full server backup including the settings.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463

SSy

Active Member
May 10, 2016
29
0
1
cPanel Access Level
Root Administrator
Would it be better to install 56 then overwrite all the directories and files that were saved? Or do I have to do it pre-install first?

And do I just run this:

cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest

after editing this file with the version I want:

/etc/cpupdate.conf

By adding this line:

CPANEL=11.56.0.13
 
Last edited by a moderator:

SSy

Active Member
May 10, 2016
29
0
1
cPanel Access Level
Root Administrator
So in essence, is the recovery process as follows?:

1) Edit /etc/cpupdate.conf and add this line: CPANEL=11.56.0.13
2) Run cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest
3) Manually copy over all the backed up system files and directories and override the new ones, including mySQL.

All my account data (home directory) is intact and saved. Can I just copy that over afterwards to the new home directory, or even better, remount it? Should I do that before or after installation?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463
So in essence, is the recovery process as follows?:

1) Edit /etc/cpupdate.conf and add this line: CPANEL=11.56.0.13
2) Run cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest
3) Manually copy over all the backed up system files and directories and override the new ones, including mySQL.

All my account data (home directory) is intact and saved. Can I just copy that over afterwards to the new home directory, or even better, remount it? Should I do that before or after installation?
Hello,

You'd only want to manually restore individual configuration files that aren't already included in the account backup archives (e.g. /var/cpanel/cpanel.config, /etc/my.cnf, /etc/exim.conf.local, /etc/exim.conf.localopts). The individual backup archives will restore the account-specific data, so there's no need to copy over the home directories or databases (unless MySQL databases are not included in the backup archives).

Thank you.
 

SSy

Active Member
May 10, 2016
29
0
1
cPanel Access Level
Root Administrator
Okay, so a couple of questions:

1) Should I restore config files before or after installing WHM?
2) Is the syntax I listed above the correct way to install version 56?
3) Is there a list of the system files I should copy over? You listed 4 of them but how do I know which ones I should do? Can I not just override everything?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463
1) Should I restore config files before or after installing WHM?
After.

2) Is the syntax I listed above the correct way to install version 56?
Yes, however note the /etc/cpupdate.conf file won't exist by default. You'll need to create it first.

3) Is there a list of the system files I should copy over? You listed 4 of them but how do I know which ones I should do? Can I not just override everything?
There's no list, as generally this feature is intended for use when restoring files on the same system (e.g. You make an Exim configuration change and want to revert it), as opposed to restoring files when a hard drive fails. Most of those files (e.g. /etc/passwd, /etc/localdomains, httpd.conf) are automatically populated when you restore the account. I recommend simply restoring the accounts and using the default configuration settings unless you are aware of any specific changes you made on the previous server.

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463
New If you have any knowledge of Cloudlinux, is it better to first install WHM or first install Cloudlinux?
Converting to CloudLinux after installing cPanel on a CentOS server is a simple process:

CloudLinux Documentation

However, you can also install CloudLinux from the start if you prefer:

CloudLinux Documentation

There's no difference between the converted servers and the servers with CloudLinux installed from the start.

Thank you.