Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Restoring backup to another server issue

Discussion in 'Data Protection' started by quanin, May 15, 2019.

Tags:
  1. quanin

    quanin Well-Known Member

    Joined:
    Aug 18, 2011
    Messages:
    114
    Likes Received:
    3
    Trophy Points:
    68
    cPanel Access Level:
    Root Administrator
    I was testing my backups as I do every so often, which meant spinning up a new server instance, installing CPanel, transferring the backup files, and restoring them to the test server. Previously, I was able to upload the backup files to either /home or /root and have CPanel pick them up. This time, however, CPanel behaved as though they weren't there. Has something changed in the update to 80? Both the live server and the test instance were running 80.4.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. GOT

    GOT Get Proactive! PartnerNOC

    Joined:
    Apr 8, 2003
    Messages:
    1,370
    Likes Received:
    154
    Trophy Points:
    193
    Location:
    Chesapeake, VA
    cPanel Access Level:
    DataCenter Provider
    Are they .gz compressed or are you using incremental? If incremental you need to stick them in their own folder and then set up backups on the new server to point there before they are read.

    You can also use the /scripts/restorepkg /path/to/backup/username
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. quanin

    quanin Well-Known Member

    Joined:
    Aug 18, 2011
    Messages:
    114
    Likes Received:
    3
    Trophy Points:
    68
    cPanel Access Level:
    Root Administrator
    They're .gz compressed. They worked when last I did it, though that was using 76.

    FWIW, I ran the backup/restore script on the live server and it picked them up without issue in their respective backup folders, but just sticking the files themselves in /home appears broken.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. GOT

    GOT Get Proactive! PartnerNOC

    Joined:
    Apr 8, 2003
    Messages:
    1,370
    Likes Received:
    154
    Trophy Points:
    193
    Location:
    Chesapeake, VA
    cPanel Access Level:
    DataCenter Provider
    I've not used 80 yet. Probably a bug.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. quanin

    quanin Well-Known Member

    Joined:
    Aug 18, 2011
    Messages:
    114
    Likes Received:
    3
    Trophy Points:
    68
    cPanel Access Level:
    Root Administrator
    That's what I figured, hence the thread. Not worth a support ticket just at the minute, as the server's only alive as long as I need it for testing.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. quanin

    quanin Well-Known Member

    Joined:
    Aug 18, 2011
    Messages:
    114
    Likes Received:
    3
    Trophy Points:
    68
    cPanel Access Level:
    Root Administrator
    Additional info:
    I was able to reproduce this on the live server, now that I've got a minute at work. Backup restoration does appear broken in 80.4. I created a test user, "debug", on the live server. Logged into that user, and downloaded a full backup. I uploaded that backup to /home, then deleted the test user. I attempted to restore that user, CPanel couldn't find the backup. When I copied the tarball to within my backup directory structure, CPanel found it without issue. For kicks, I copied it into the directory that was created for today's backup. I deleted the tarball from my backup folder, kept the copy in /home, and CPanel forgot the backup existed.

    Result: Previously working behaviour (backup files located in /home being restorable within WHM) no longer working. This applies equally to /root, and presumedly other directory structures as well though I haven't tested /home2, /web etc.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,009
    Likes Received:
    2,123
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. quanin

    quanin Well-Known Member

    Joined:
    Aug 18, 2011
    Messages:
    114
    Likes Received:
    3
    Trophy Points:
    68
    cPanel Access Level:
    Root Administrator
    @cPanelMichael: So if I understand correctly, you can no longer do the following as of at least CPanel 76. Please tell me if that information is incorrect.

    1: Spin up a clean CPanel server, IE: to recover from an OS drive failure
    2: Upload the backups from the old server to either /home or /root on the new server
    3: Restore multiple of those backups at once to the new, working server

    If this is correct, this should be interpreted as a bug, IMO. I don't necessarily want to go through the restore a full backup/cpmove file interface for every single account I have a backup for. What is the logic for requiring I do so?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,009
    Likes Received:
    2,123
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @quanin,

    You can still perform this task, however we recommend using the command line to do this since the command line is the most common method used to transfer the backup archives to the new server. You'd follow the steps listed under "Step 6" on the document linked below instead of using WHM >> Backup Restoration:

    Full Disaster Recovery - cPanel Knowledge Base - cPanel Documentation

    Here's the specific command you'd use to restore multiple accounts:

    Code:
    cd BACKUPDIRECTORY/TYPE/DATE/accounts/
    for archive in `ls`; do /scripts/restorepkg $archive; done
    Note you can still use WHM >> Backup Restoration if you prefer, however to use this feature you must first enable account backups and the Retain Backups in the Default Backup Directory setting in WHM's Backup Configuration (WHM >> Home >> Backup >> Backup Configuration) interface. Then, once you've moved the backups to the correct location and restored them, open WHM >> Backup Configuration and enable/disable your preferred settings.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice