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.

Manual Backups - pkgacct and restorepkg

Discussion in 'General Discussion' started by bjdea1, Jul 17, 2004.

  1. bjdea1

    bjdea1 Well-Known Member

    Joined:
    Mar 6, 2003
    Messages:
    83
    Likes Received:
    1
    Trophy Points:
    8
    Hi,
    I am trying to write my own load sensitive backup script to basically replace the WHM one - which is great but I need to change the time of backups and spread them over a longer time period to reduce server load.

    So - I have found that I can manually package a users account using pkgacct - this creates a cpmove-<username>.tar.gz file in home directory. Then I've found I can use restorepkg to restore it again. But I would also like to be able to use the Backup Restore section in WHM, but it fails. If I move the cpmove file to the /backup/cpbackup/daily/ directory and rename it <username>.tar.gz - if I then go to the WHM restore daily backup I get:

    Extracting tarball...................
    Done
    Extracting Domain....Done
    Sorry, the copy failed. Unable to find the cpanel user file
    Account Restore Failed...

    I've tried this method with 2 accounts but both give the same error - does anyone know why or how to fix this?
    Thanks
     
  2. mgdoyle

    mgdoyle Member
    PartnerNOC

    Joined:
    Apr 24, 2004
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    bump

    I get the exact same error. I have moved three accounts with no problem, but this last one gives me the same error.

    I have seen multiple posts with this problem but no explanations. Anyone?
     
  3. zentity

    zentity Well-Known Member

    Joined:
    Jun 16, 2004
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    What kind of backups do you have selected within your whm - Incremental or .tar.gz backups?

    You need to have .tar.gz backups selected in order to restore any .tar.gz backups - I'll have a play with this and update you what I find since its a while that I restored an account that way :)
     
  4. zentity

    zentity Well-Known Member

    Joined:
    Jun 16, 2004
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    If you want to restore a backup made with pkgacct via the /backup/cpbackup/daily for instance, then you need to do the following.

    1. Make sure that non incremental backups are selected.
    2. You need to untar the cpmove-user.tar.gz backup when you have created it using pkgacct user.
    3. You need to rename the resulting cpmove-user directory to user (Just the same format as your regular backups)
    4. Tar the user directory up to be user.tar.gz then drop it into your /backup/cpbackup/daily
    5. Use whm daily backup restore to restore that users backup

    Your accounts aren't restored the way you are doing it (renaming the .tar.gz only) as simply renaming the .tar.gz backup to user.tar.gz will still extract a directory named cpmove-user - The backup restore isn't looking for cpmove-* its only looking for user

    Alternatively upload the cpmove-user.tar.gz file and use the restore full backup feature within whm :)

    Hope that helps.
     
    #4 zentity, Aug 15, 2004
    Last edited: Aug 15, 2004
Loading...

Share This Page