Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 13 of 13
  1. #1
    Member
    Join Date
    Jan 2004
    Posts
    30

    Default CPanel website Backup/HOW DO I RESTORE ?

    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. #2
    Member
    Join Date
    Apr 2003
    Posts
    479

    Default

    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. #3
    Member
    Join Date
    Jan 2004
    Posts
    30

    Default

    hi,

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

  4. #4
    Member
    Join Date
    Jan 2004
    Posts
    30

    Default

    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. #5
    Member Murtaza_t's Avatar
    Join Date
    Jan 2005
    Location
    Earth
    Posts
    471

    Default

    Quote Originally Posted by gordypordy
    Would I just untar this file there and it would install and overwrite evrything as appropriate ?
    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. #6
    Member
    Join Date
    Jan 2004
    Posts
    30

    Default

    Quote Originally Posted by Murtaza_t
    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.
    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
    Last edited by gordypordy; 01-30-2006 at 08:32 AM.

  7. #7
    Member Murtaza_t's Avatar
    Join Date
    Jan 2005
    Location
    Earth
    Posts
    471

    Default

    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. #8
    Member
    Join Date
    Apr 2003
    Posts
    479

    Default

    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. #9
    Member Murtaza_t's Avatar
    Join Date
    Jan 2005
    Location
    Earth
    Posts
    471

    Default

    Quote Originally Posted by elleryjh
    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.
    No buddy that should work fine.

  10. #10
    Member
    Join Date
    Jan 2004
    Posts
    30

    Default

    Quote Originally Posted by Murtaza_t
    No buddy that should work fine.

    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!


  11. #11
    Member
    Join Date
    Apr 2003
    Posts
    479

    Default

    Oh wow, that makes life easier...I thought you could only restore WHM-created backups with restorepkg. Thanks Murtaza_t

  12. #12
    Member
    Join Date
    Jan 2004
    Posts
    30

    Default

    Quote Originally Posted by elleryjh
    Oh wow, that makes life easier...I thought you could only restore WHM-created backups with restorepkg. Thanks Murtaza_t

    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. #13
    Member Murtaza_t's Avatar
    Join Date
    Jan 2005
    Location
    Earth
    Posts
    471

    Default

    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.

Similar Threads & Tags
Similar threads

  1. backup restore in cpanel
    By mahdi1 in forum Data Protection
    Replies: 7
    Last Post: 07-28-2009, 12:35 PM
  2. Replies: 1
    Last Post: 07-31-2008, 02:24 AM
  3. Restore Cpanel Backup.
    By saeed63 in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 08-12-2006, 03:47 PM
  4. What To Backup For CPanel Restore?
    By frelliot in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 06-01-2006, 11:18 AM
  5. using the restore backup in cpanel
    By pcwhite in forum cPanel and WHM Discussions
    Replies: 10
    Last Post: 03-14-2002, 12:13 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube