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 backup that was made on another cPanel server?

Discussion in 'General Discussion' started by jols, Mar 20, 2006.

  1. jols

    jols Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,111
    Likes Received:
    2
    Trophy Points:
    38
    I thought the answer would be much easier to see/figure out in WHM:

    I have made backups, not compresses/cpmove backup files, but full regular backups to the second hard drive using WHM, e.g. daily/weekly, etc.

    Okay, so I copied these backups via rsync to a separate (backup/archive) server.

    Now I need to restore one of these accounts to a new server, but how exactly do I do this?

    Thanks very much for anything here.

    --------
    BTW, I spent quite a bit of time searching through this forum and could not find any answer that directly applied.
     
  2. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,384
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    You can copy the .tar.gz backup file into /backup/cpbackup/daily or any of the daily, weekly, or monthly directories and then it should show up in your WHM when you go to restore an account. Actually, I think you can create a directory in the /backup/cpbackup directory and place the .tar.gz file into that directory and then select that directory from the WHM Restore Account feature. Adjust the /backup directory depending on your current set up, but this is usually the default directory.

    Alternatively, you can restore the account from the shell. You would need to copy or move the .tar.gz file into the /home directory (doesn't have to be /home, there's a list of directories that the script looks through, I don't remember them, I usually juse use /home). Then from shell issue the command:

    /scripts/restorepkg <username>

    Where <username> refers to the username of the backup file (i.e. john.tar.gz backup file would be the john user).
     
  3. jols

    jols Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,111
    Likes Received:
    2
    Trophy Points:
    38
    I don't have a .tar.gz file.

    Each account was archived in a series of separate directories & files.
     
  4. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,384
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Was the backup made using the CPanel backup feature? It was just set for incremental backups?

    You should still be able to restore the account, just move the username directory inside the /backup/cpbackup/daily or any of the daily, weekly, or monthly directories (again, you should be able to create a directory inside the /backup/cpbackup directory and then select it from the WHM).

    Now log into the WHM on the server that you are restoring the account onto and select Restore Backups from the WHM and select the directory that you placed the backed up directory into.

    If the user is not seen here, then you may need to configure the backup script to use incremental backups. Just click on Configure Backup and check the Enabled button next to "Incremental backup" and click Save. Then go back to the Restore Backups and the account should be listed. Then you can restore the account. Be sure to go back to the Configure Backup and change the Incremental backup option back if you changed it.
     
  5. jols

    jols Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,111
    Likes Received:
    2
    Trophy Points:
    38
    Yes, and yes.

    Okay, thanks much for the advice.
     
Loading...

Share This Page