nootkan

Well-Known Member
Oct 25, 2006
146
9
168
I had a hard drive start to fail on my server and had my data center replace it. Before doing so I forgot to back up all my WHM settings among a few others. Luckily I get to have access to my original drive for seven days before it is removed.

I read through this documentation:
Back Up, Restore, or Transfer Configurations - Documentation - cPanel Documentation

I was able to backup my WHM config and WHM Tweek Settings just fine. But when I tried to restore the files nothing happened not even a notification saying it failed.

So my question is what part of this line should be replaced with my backup tar file?
/usr/local/cpanel/bin/cpconftool --configurations=cpanel::system::whmconf --restore=/home/whm-config-backup-cpanel__system__whmconf-11.55.0.9999-1454090817.tar.gz --preresore_backup

I cd' to the root directory and ran this:
/usr/local/cpanel/bin/cpconftool --configurations=cpanel::system::whmconf --restore=/home/whm-config-backup-all-1.1-1461360975.tar.gz
--preresore_backup

That is the name of the file that was backed up.

Update: Okay I dropped the --preresore_backup and it worked however it moved it into the /home/ directory and when I checked the WHM Tweak Settings they were still the default.
 
Last edited:

nootkan

Well-Known Member
Oct 25, 2006
146
9
168
Thank you for your reply, however I'm not sure I understand what you're trying to tell me. I want restore the WHM config file which is the tar.gz file.

The way I understand the script is
/usr/local/cpanel/bin/cpconftool --configurations=cpanel::system::whmconf --restore=/home/whm-config-backup-all-1.1-1461360975.tar.gz --this part defines the file to restore, right?
--preresore_backup --this part is supposed to be where you want the file to be restored to, right?

Also should --preresore_backup actually be --prerestore_backup? I just copied the text from the original post which could be a "typeO"

So I believe this is what you're trying to tell me and if so, how do I know where the WHM file is supposed to go to? In other words, where is it located on the server so I can get the backup to the right path? Thanks.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,216
463
Hello :)

I had a hard drive start to fail on my server and had my data center replace it. Before doing so I forgot to back up all my WHM settings among a few others. Luckily I get to have access to my original drive for seven days before it is removed.
Could you verify how you are accessing the the original drive to generate the configuration file backups? Also, which version of cPanel was installed on that system? The documentation you have linked to is for cPanel version 56. The documentation for cPanel version 54 is found at:

The cpconftool Script - Version 54 Documention - cPanel Documentation

Thank you.
 

nootkan

Well-Known Member
Oct 25, 2006
146
9
168
Tweak Settings are located in /var/cpanel/cpanel.config, you can transfer it manually and get rid of these hassle.

Hope that helps :)
Modserv, thanks for that. I was actually looking for all the WHM settings and not just the Tweak Settings but I'll copy those over too.
 
  • Like
Reactions: ModServ

nootkan

Well-Known Member
Oct 25, 2006
146
9
168
Hello :)



Could you verify how you are accessing the the original drive to generate the configuration file backups? Also, which version of cPanel was installed on that system? The documentation you have linked to is for cPanel version 56. The documentation for cPanel version 54 is found at:

The cpconftool Script - Version 54 Documention - cPanel Documentation

Thank you.
Michael. my data center mounted the old drive on the server so I could copy over the config files and others that I forgot to backup. I've been using sftp mostly but the occasional ssh command also to copy over the files. I'm not sure what cPanel version was installed on the old drive, I can only assume it was a version before the one that is installed now because of the new drive and OS etc.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,216
463
Michael. my data center mounted the old drive on the server so I could copy over the config files and others that I forgot to backup. I've been using sftp mostly but the occasional ssh command also to copy over the files. I'm not sure what cPanel version was installed on the old drive, I can only assume it was a version before the one that is installed now because of the new drive and OS etc.
The /usr/local/cpanel/bin/cpconftool script is designed to be ran on an active system to generate the backup configuration files, as opposed to packaging configuration files from a mounted drive. Thus, you would have to manually copy over the configuration data from the files available on the mounted drive. Is there any particular configuration data you are having trouble copying over or replicating?

Thank you.