New backup not working

tagteam

Member
May 21, 2013
18
1
53
cPanel Access Level
Root Administrator
I am on WHM 11.38.2 (build 12) and i am using the new backup. However, when I run a restore it doesnt overwrite the existing data. I want to go back to a database that was two days ago and I selected the backup and selected
Restore Subdomains
Restore Mail Configuration
Restore MySql

However after the restore the data is still the same and not the data from two days ago.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello :)

Have you tried terminating an account before restoring it? That's typically the method in which most accounts are restored. However, the issue you reported should be addressed as well. Have you tried restoring an account with the "--force" flag via the command line?

Thank you.
 

tagteam

Member
May 21, 2013
18
1
53
cPanel Access Level
Root Administrator
I have not tried terminating the account because as you can imagine that is a bit risky. If the restore does not work after that you are left with nothing.

The old system was great because there was an option to overwrite an existing database and I definitely think that should also be available in the current backup.

First I will try the --force flag but can you please inform me of the rest of the command since the old way does not work. I need to also be able to make sure I am running the restore for a specific account and not all accounts

After that I will create a test account, build up a database, terminate it and then try to restore.

After that I will post the results here for others to see.
Thanks
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello :)

You can force the restore of an account if it already exists via:

Code:
/scripts/restorepkg --force /home/$username.tar.gz
Note that you will need to change the path of the backup archive for the account. Forcing a restore is generally not recommended. It's going to overwrite your data with the contents of the archive, so it's not much more protection over terminating an account first. Typically, if you only want to restore certain aspects (e.g. databases), you would restore them manually through cPanel or by extracting the contents of the archive and manually importing that data into the account.

Thank you.
 

tagteam

Member
May 21, 2013
18
1
53
cPanel Access Level
Root Administrator
ok, so the better method is to extract the archive and then you can individually restore the database or the files.

I looked in the archive and i see that there are two files in the mysql folder. a .create file and a .sql file

does the .create file need to be used or can i just create a new database and then run:
mysql newdatabase < olddatabase.sql
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
You can create a new database via cPanel and then import the SQL file.

Thank you.