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.

How do I restore a user's cpanel backup?

Discussion in 'General Discussion' started by junglecat, Feb 17, 2008.

  1. junglecat

    junglecat Well-Known Member

    Joined:
    Jul 6, 2004
    Messages:
    168
    Likes Received:
    0
    Trophy Points:
    16
    A user installed a mod in his forum, breaking the forum. He wants me to restore the latest backup he had in his account dated before he broke the site. This is the tar.gz backup that the users make from their own cpanel.

    I can't find an option in WHM to restore users' backups (just the cpmoves), so I tried executing the shell command tar -zxpf <file.tar.gz> but that didn't work.

    The server is WHM 11.15.0 cPanel 11.17.0-R19429
    FEDORA 4 i686 on standard - WHM X v3.1.0
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,481
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    "Restore Full Backup" in WHM. You'll see this message:

     
  3. junglecat

    junglecat Well-Known Member

    Joined:
    Jul 6, 2004
    Messages:
    168
    Likes Received:
    0
    Trophy Points:
    16
    That didn't work.

    Here's what I did.

    cp /home/USERNAME/backup-2.16.2008_11-07-11_USERNAME.tar.gz /home/backup-2.16.2008_11-07-11_USERNAME.tar.gz

    Sure enough, it showed up in Restore a Full Backup/cpmove file

    But when I clicked to restore, I got this:

    Restore for USERNAME
    Searching /home....
    Found backup-2.16.2008_11-07-11_USERNAME.tar.gz !
    Moving Packge to /home/cprestore/backup-2.16.2008_11-07-11_USERNAME.tar.gz
    Extracting tarball...................
    ...............
    ...............
    Done
    Extracting Domain....Done
    Generating Account....
    Checking input data...Account Creation Status: failed (Sorry that username (USERNAME) is taken. Check /etc/passwd)
    checked 84 files.....
     
  4. cpanelinfoseeker

    cpanelinfoseeker Well-Known Member

    Joined:
    Oct 25, 2002
    Messages:
    325
    Likes Received:
    3
    Trophy Points:
    18
    Location:
    NE Illinois
    cPanel Access Level:
    Root Administrator
    What about entering the users cpanel and using the restore feature in their cPanel? I have restored my account that way before without problem. This "knows" that the username exists and restored anyway. It will look for you to have the file on your harddrive and upload it using cPanel. This was on cPanel 10 a few months ago though.

    Hope it works still,
    Ron
     
  5. junglecat

    junglecat Well-Known Member

    Joined:
    Jul 6, 2004
    Messages:
    168
    Likes Received:
    0
    Trophy Points:
    16
    I don't have it on my hard drive. But I can ask the user if he wants to try to restore it himself that way. It may be too big to download/upload, though. It's a big, very busy forum.
     
  6. cpanelinfoseeker

    cpanelinfoseeker Well-Known Member

    Joined:
    Oct 25, 2002
    Messages:
    325
    Likes Received:
    3
    Trophy Points:
    18
    Location:
    NE Illinois
    cPanel Access Level:
    Root Administrator
    ARRRGGGGGHHH, Please ignoore my previous post. I have just looked closer at the file format, and it is a FULL backup that you have, not the USER backup.

    backup-domain.tld-2-16-2008.tar.gz would be the file the user would need to restore that way.

    Deleting the account and then using the FULL restore would restore the account to the date/time that the backup was made for everything.

    I am sorry, I think I need more sleep,
    Ron
     
  7. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,481
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Depending on exactly what he did wrong, you might only need to restore his database.


    He should know then that backing up the database first is always the best way to go. Unpack the backup, and restore the database only via shell.

    example:

     
  8. GLJones

    GLJones Registered

    Joined:
    Feb 27, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    I have a problem related to this but I didn't see any threads on it.

    I have a cPanel home directory backup. I also have a cPanel database backup. When I try to restore them to the server using the cPanel backups page, they take some time to upload, then I get a page with something like "Restoring" but then nothing happens. The database is not added, the home directory is not restored. No error, no nothing.

    Any ideas?

    I ended up using PHPMyAdmin to restore the database but the home directory restore just doesn't work.

    Jerry
     
  9. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,481
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    You should ask your host to restore it for you.
     
  10. GLJones

    GLJones Registered

    Joined:
    Feb 27, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Thanks but I am the host.

    Jerry
     
  11. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,481
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    How large is the backup and have you tried uploading the backup and restoring via WHM?

     
  12. GLJones

    GLJones Registered

    Joined:
    Feb 27, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    the home directory is 5.2GB (Lots of images in a gallery).

    I was finally able to ftp the file directly between the servers and got everything working.

    More interested in why the SQL backups (15MB) won't restore through cPanel. I can use PHPMyAdmin and they import fine.

    Jerry
     
  13. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    If you are attempting to do the restore while logged into the user's cPanel as the root or reseller user, it won't work.
     
Loading...

Share This Page