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 to restore incremental backup?

Discussion in 'General Discussion' started by hbhb, Mar 21, 2007.

  1. hbhb

    hbhb Well-Known Member

    Joined:
    Dec 1, 2006
    Messages:
    67
    Likes Received:
    0
    Trophy Points:
    6
    I have difficult situation here.

    My HDD1 was crashed, so I reload fresh OS on HDD2 without cpanel. I mount the old HHD1 as my secondary drive and I can see my home and backup on the same drive

    /mnt/cpbackup/daily
    /mnt/home

    How can I restore my incremental daily backup to another cpanel server remotely?

    And also is it possible if I restore /mnt/home/alluser into my HDD2 (with fresh OS & new cpanel)? Please show me the steps. This is my first time

    Thanks!
     
  2. jsnape

    jsnape Well-Known Member

    Joined:
    Mar 11, 2002
    Messages:
    174
    Likes Received:
    0
    Trophy Points:
    16
    Ouch. That's not a good scenario. You would need to rsync them over being very careful to retain file ownership. Then restore them.

    Off the top of my head I'd say on the old server do this:

    rsync -av -e ssh /mnt/cpbackup/daily 192.0.0.0:/mnt/cpbackup/

    but do

    rsync -av -e ssh /mnt/cpbackup/daily/aUser 192.0.0.0:/mnt/cpbackup/daily/ (insert actual IP of new server)

    first and restore that first site to see if it works. Someone else may chime in with a better set of switches or faster method. If the sites are heavily filled with small spam files it might be quicker to archive them first or use rsync -avz .
     
    #2 jsnape, Mar 21, 2007
    Last edited: Mar 21, 2007
  3. hbhb

    hbhb Well-Known Member

    Joined:
    Dec 1, 2006
    Messages:
    67
    Likes Received:
    0
    Trophy Points:
    6
    rsync sounds difficult to me as i have never tried it.

    how about if i restore it to my HDD2 (which is now my primary), I need cpanel installed first am I right? and after that, what should I do in WHM or SSH in order to restore the backup in /mnt/cpbackup/daily/usernames

    If I can restore /mnt/home/usernames straight-away, would be even better!

    anyone? help? :confused:
     
  4. jsnape

    jsnape Well-Known Member

    Joined:
    Mar 11, 2002
    Messages:
    174
    Likes Received:
    0
    Trophy Points:
    16
    You'll be restoring them using WHM so yes, it has to be installed first. But not transferring the sites to another physical location will speed up the restore by about 12-24 hours depending on how many sites you have. Especially if the new server is at one of those data centers that offers 25TB monthly transfer @ 9600baud speed.

    I'd definitely find a way to restore them first and move them later. And you should probably use the cpanel recommended partition scheme which goes something like this:

    /boot (100MB)
    / (20gb)
    / var (10GB)
    / usr (10GB)
    / tmp (2gb)
    / swap (2gb)
    / home (the rest)

    assuming that its an 120-250GB HD or look up cpanel's exact recommended sizes somewhere on this site.

    You can't restore the sites before cpanel because restoring them takes the files out of the one backup directory and puts them where they need to be. To do that install cpanel, set up your backup settings then go to the restore multiple sites link and start.

    I'd recommend using firefox as it tends to die less than IE during the restore.

    And contact your customers asking what high priority sites need restored NOW, and do those in a separate restore process while the auto process is running. To a certain extent you can get away with that. Youi don't want to be restoring some site that was long forgotten while another customer might have some ad blitz running for his losing $1000 a minute website. (everyones site loses $1000 a minute when its down, thats why they put it on a shared server for $3 a month)
     
    #4 jsnape, Mar 21, 2007
    Last edited: Mar 21, 2007
  5. hbhb

    hbhb Well-Known Member

    Joined:
    Dec 1, 2006
    Messages:
    67
    Likes Received:
    0
    Trophy Points:
    6
    Mine's a 120GB hard drive.

    I didn't use the recommended but use
    /boot 10mb
    /swap 5gb
    / fill the space

    OK, want i need to know is how to restore them after i install my cpanel?
     
  6. jsnape

    jsnape Well-Known Member

    Joined:
    Mar 11, 2002
    Messages:
    174
    Likes Received:
    0
    Trophy Points:
    16
    In WHM you go to "backup" | configure backup
    set it up for incremental and point it to where the backups already are and save
    Then backup | restore multiple backups
    and restore them. It will restore in alphabetical order (by username).

    When the first site restores, check it, and check them often as they restore. And don't let the auto process die (use firefox) because if it does, you have to start again and check (or uncheck) a whole bunch of boxes for the sites that are already restored.
     
  7. hbhb

    hbhb Well-Known Member

    Joined:
    Dec 1, 2006
    Messages:
    67
    Likes Received:
    0
    Trophy Points:
    6
    Backup Status: Restore
    Backup Interval: Daily
    Backup Retention: none
    Days to run backup: All Monday - Sunday
    Remount/Unmount backup drive: Disabled
    Bail out if the backup drive cannot be mounted: Disabled
    Incremental backup: Enable
    Backup Accounts: Enable
    Backup Config Files: Enable
    Backup Type: Standard
    Use Passive mode: Disabled
    Backup Destination: /mnt/cpbackup/daily

    Is this all correct?


    How about my question of possiblity restoring /home/usernames directly manually? I prefer to restore the latest data.. my backup is a few hours back dated.
     
  8. jsnape

    jsnape Well-Known Member

    Joined:
    Mar 11, 2002
    Messages:
    174
    Likes Received:
    0
    Trophy Points:
    16
    I'd unmount the drive when backups aren't running.

    Remount/Unmount backup drive: Enabled
    Bail out if the backup drive cannot be mounted: Enabled

    It would give a little bit of protection from a mass defacement script recursing down through /backup and defacing those too. I don't think the script kiddy defacers are using scripts that mount drives before they start. At least not yet.

    I don't understand the other question. If the only files you have are the backup files, those are the latest files.
     
    #8 jsnape, Mar 22, 2007
    Last edited: Mar 22, 2007
Loading...

Share This Page