Backup restores not restoring database?

maestroc

Well-Known Member
Aug 23, 2012
86
2
58
cPanel Access Level
Reseller Owner
I recently switched from the old legacy system to the new system and have my WHM backing up all accounts to Amazon S3 on a daily basis. However, when restoring backups I am having an issue that has me baffled. I think I have things configured correctly but please help me figure out what is wrong....

On two different occasions I have had to restore an account from backup. I move the backup file back to the server from Amazon S3 and then go into WHM and tell it to restore the account. Everything proceeds normally and WHM says it is completed. However, when I return to the restored site it still seems to be using the old (unrestored) database even though the files have been replaced with the backed up files.

I tried restoring five different backups from various days but it doesn't seem to restore the database for any of them.

I have WHM's backup settings set to do "Per Account and Entire SQL Directory."

When restoring the "Restore SQL" box is checked.

Am I missing something here? I was expecting the backup restore to reset the account to exactly the way it was on the date the backup was made but it doesn't seem to be doing that.

Also, on a possibly related error note, during one restore attempt WHM suddenly told me I needed to log back in but when doing so with root it said my credentials were not valid. About ten minutes later I was able to log in normally however... Don't know if that is related to my problem or not but it only happened on one restore attempt.

Any ideas what is wrong?
 

cPanelPeter

Senior Technical Analyst
Staff member
Sep 23, 2013
585
25
153
cPanel Access Level
Root Administrator
Hello,

Please try terminating the account first before issuing the restore. In some instances MySQL databases are not restored if they already exist. We do have a case open on this issue. Case # 64228 - The --force flag is passed to MySQL but appears to be getting ignored. If this is happening to you, please open a ticket using the link in my signature and we can confirm that this is the case for you. If so, we will add your ticket to the case.

At this time, we do not have a fix for the case yet available, (the work around is to first terminate the account and then restore). When the case is resolved, it will appear in the Change Log.
 

maestroc

Well-Known Member
Aug 23, 2012
86
2
58
cPanel Access Level
Reseller Owner
Not having done this step before please let me know, if I terminate the account do I need to recreate it before trying to restore the backup or does restoring the backup automatically recreate the account?
 

bsich

Member
Mar 18, 2009
13
0
51
maestroc, I had a week of hell and confusion. All indications were the database restored correctly but the data was old. Cpanel finally came back giving me the resolution to delete and rebuild the account.

It would be good if the recovery report tells you what is and is not recovered like the legacy report.