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.

Restoring from a full backup

Discussion in 'General Discussion' started by bexvlad, May 12, 2011.

  1. bexvlad

    bexvlad Registered

    Joined:
    May 12, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    This is the background. A Wordpress site I host via my WHM account was regularly giving 404 errors - so I eventually decided to terminate the account and create a new one for the domain. I took a full backup via cPanel and have a safely downloaded file called backup-5.11.2011_06-38-52_username.tar.gz

    I created the new account (using exactly the same names, passwords etc), installed Wordpress via Fantastico De Luxe, installed the plugins and correct Wordpress theme, then went to restore my database. It appeared to be restoring but nothing happened.

    Searching this forum I found indications that you cannot restore while there is already a database in place, also that you cannot restore other than by accessing cPanel vie WHM in order to gain web host permissions. Nothing I have tried works. I am now left with a database called backup-5.11.2011_06-38-52_username.tar.gz which I cannot delete (it says it's deleting it but still it remains, like a zombie).

    Should I have done a restore before (or instead of) installing Wordpress?

    Should I have unzipped the .tar file before trying the restore?

    cPanel has a Full Backup function (from either 'Backup' or 'Backup Wizard' but not a Full Restore function, so what am I meant to do? Perform the four partial restore operations in order?

    Do I really need to do all this via WHM?

    Could someone please give my a step-by-step guide to getting this site back to where it was?
     
  2. nobodyk

    nobodyk Well-Known Member

    Joined:
    Aug 1, 2010
    Messages:
    90
    Likes Received:
    0
    Trophy Points:
    6
    You could move the backup to /home and restore it via WHM -> Restore a Full Backup/cpmove file
    then just type the username. You must delete the current account though.

    Alternatively, what you failed to do was to import the database correctly. If you want to restore the database, extract the contents of the backup and look for the sql file, which is located under MySql in the archive. Then run this command from where the sql is located:
    mysql -u root -p[root_password] [database_name] < dumpfilename.sql

    Note: In the command above do not include the []
    Ex: if you root password is wie923, database name is userabc_db1, and sql dump file is databasebackup.sql

    You will run the following command:
    mysql -u root -pwie923 userabc_db1 < databasebackup.sql
    Also, it's < and not >

    To extract the backup you can use this command or extract it manually,
    tar –xvzf backup-5.11.2011_06-38-52_username.tar.gz

    You will need basic knowledge of linux to complete the tasks above.
     
  3. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,448
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    I'm not sure why you'd wipe the entire account due to 404 errors (file not found) and then want to restore it. You installed a fresh new site set it all up and now want to overwrite all of that with a backup of the site that was giving you errors. Restoring that backup, restores whatever issues it had and wipes all traces of the new fresh site you just setup.

    Instead you should be looking closer at why the 404 errors. If you're unsure how to do that, your host can help I'm sure.

    You cannot restore a Full System backup from cPanel UI, you'll need to do that from SSH or WHM.
     
  4. bexvlad

    bexvlad Registered

    Joined:
    May 12, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for the response. Part of my confusion is down to my hosting company supplying a crippled version of WHM without a Backup (and therefore Full Restore) facility. I am on to them to get this fixed. You need to be aware that some hosts do this!
     
  5. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,448
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    I'm well aware of smaller hosts not providing backup services for their users. You should go with a larger company in a case such as this. Proper backups should be done nightly to a backup drive off the main hard drive, or better yet, to an off server backup solution. End users should be able to take Full System backups for safe keeping when they want.

    If your host does not provide this sort of functionality, you're with the wrong host.

    My 2.

    GL!
     
Loading...

Share This Page