The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

New backup not working

Discussion in 'Data Protection' started by tagteam, Nov 7, 2013.

  1. tagteam

    tagteam Member

    Joined:
    May 21, 2013
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    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.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,724
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  3. tagteam

    tagteam Member

    Joined:
    May 21, 2013
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    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
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,724
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  5. tagteam

    tagteam Member

    Joined:
    May 21, 2013
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    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
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,724
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page