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.

CPanel website Backup/HOW DO I RESTORE ?

Discussion in 'General Discussion' started by gordypordy, Jan 29, 2006.

  1. gordypordy

    gordypordy Active Member

    Joined:
    Jan 6, 2004
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    0
    Hi,

    I'm looking for instructions on how to restore a website which was backed up using the site backup option in CPanel. The file is tar.gz

    I know I need root access for this, that's not a problem, I have it. I've just never actually done a restore b4!
    Anybody gove me some instructions.
    It's on a Linux
    OPSYS = WHM 10.8.0 cPanel 10.8.1-R30
    FreeBSD 5.4

    Ive searched the forums for an answer to this prior to posting.Seen plenty of similar posts including ones claiming that full instructions are on the forums somewhere. Just can't find where that somewhere is!!

    Thanx in advance.
     
  2. elleryjh

    elleryjh Well-Known Member

    Joined:
    Apr 12, 2003
    Messages:
    479
    Likes Received:
    0
    Trophy Points:
    16
    If it was made in cpanel, then you should be able to restore it in cpanel.

    On the backups page, upload the file under "Restore a Home Backup". The backup will overwrite the current files there.

    Alternatively, you could upload it to the server in a temp directory.
    tar xvfz name-of-backup.tar.gz
    Files will be extracted to a directory. Move the files to the user's home directory
     
  3. gordypordy

    gordypordy Active Member

    Joined:
    Jan 6, 2004
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    0
    hi,

    okay, I'll give both of them a try.
    Thanx for the VERY speedy response! :D
     
  4. gordypordy

    gordypordy Active Member

    Joined:
    Jan 6, 2004
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    0
    Hi,

    Ive got some queries before going ahead with this.

    The tarred file has been uploaded to the root directory of the website, where the mail folder/public_html/www folders etc are located.

    Would I just untar this file there and it would install and overwrite evrything as appropriate ?
     
  5. Murtaza_t

    Murtaza_t Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    476
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Earth
    cPanel Access Level:
    Website Owner
    No it will not, Try this :
    -- Copy the tar file in the home directory
    -- Create an account for that user on the server from WHM >> Create Account
    -- Goto WHM >> Backup >> Restore a Full Backup/cpmove file
    -- enter the user name and it should be done.

    Please note that username on the tar file and username on the server should match.
     
  6. gordypordy

    gordypordy Active Member

    Joined:
    Jan 6, 2004
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    0
    Hi murtaza,

    Not sure I understand you here. It's maybe just me, so my apologies for being such a noob!

    The account has already been created on the server with WHM. The tarred file is now sitting in the accounts root directory, which is what I was trying to explain above.

    Are you saying that I should not untar it here (I tried it anyway and it did not work!) ? And if not, where should the file be copied to ?
    By 'HOME DIRECTORY' do you mean the accounts 'public_html' area, or do you mean the 'home' directory of the server ?

    ALSO, on the server it says "Backup is not enabled. If you are trying to restore a crashed system, please set backup to "Restore Only"

    If backup is not enabled, how would I enable this also? Do I use the enable backup option in WHM, as I do not have a backup drive installed, there is only one drive on the server and the backup configuration area has lots of options that look like you need a backup drive to enable.

    thanx :D
     
    #6 gordypordy, Jan 30, 2006
    Last edited: Jan 30, 2006
  7. Murtaza_t

    Murtaza_t Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    476
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Earth
    cPanel Access Level:
    Website Owner
    Thats Ok:

    Go with this :

    login as root on the server and move the file to /home directory:
    Code:
    ]# cp /path/to/file.tar  /home/
    and just run this script : (Assuming account is already created in WHM)
    Code:
    ]# /scripts/restorepkg username
    Paste the error here if you get any. :)
     
  8. elleryjh

    elleryjh Well-Known Member

    Joined:
    Apr 12, 2003
    Messages:
    479
    Likes Received:
    0
    Trophy Points:
    16
    Murtaza_t, I think you're mistaken. This backup was created with cpanel, not WHM. I dont think the restorepkg script will work on it.
     
  9. Murtaza_t

    Murtaza_t Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    476
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Earth
    cPanel Access Level:
    Website Owner
    No buddy that should work fine.
     
  10. gordypordy

    gordypordy Active Member

    Joined:
    Jan 6, 2004
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    0

    You're absolutely rite Murtaza, it worked a treat.
    Took about 2 mins! Man that was so easy I feel such a fool for asking.

    You rock man, excellent stuff!

    :D :D :D
     
  11. elleryjh

    elleryjh Well-Known Member

    Joined:
    Apr 12, 2003
    Messages:
    479
    Likes Received:
    0
    Trophy Points:
    16
    Oh wow, that makes life easier...I thought you could only restore WHM-created backups with restorepkg. Thanks Murtaza_t :)
     
  12. gordypordy

    gordypordy Active Member

    Joined:
    Jan 6, 2004
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    0

    In the Cpanel area, you will see an option underneath where it says 'FULL BACKUPS' for Generate/Download a Full Backup.
    And underneath the option/link it also states the following:
    Note: You cannot restore these backups, they can only be restored by your administrator.

    I don't know if that means that ALL the CPanel generated backups can be restored using the above options. Obviously I had the correct one!

    Maybe Murtaza can point out if all of the backups can be restored in this way or just the one that I have mentioned here that CPanle states can only be restored by the system admin.


    ;)
     
  13. Murtaza_t

    Murtaza_t Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    476
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Earth
    cPanel Access Level:
    Website Owner
    Yes thats true, If you are not a server administrator (that is if you dont have root access to shell or WHM) then you cannot restore these backups. you need to supply these backups to your host and they will restore it for you.

    In short you need to be root you restore FULL BACKUPS.
     
Loading...

Share This Page