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.

Please help! I want to keep my job

Discussion in 'General Discussion' started by JSD, Nov 3, 2006.

  1. JSD

    JSD Member

    Joined:
    Feb 19, 2003
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    1) The main drive failed it does not boot.
    2) We don't have backup
    3) We put a new fresh drive as primary and the damaged as secondary
    4) We mounted all partitions of the old drive and they are visible.

    What do we have to copy from old drive to new drive in order to have all the account created??? is this possible?
     
  2. kistler

    kistler Well-Known Member

    Joined:
    Jan 27, 2005
    Messages:
    136
    Likes Received:
    0
    Trophy Points:
    16
  3. shaun

    shaun Well-Known Member

    Joined:
    Nov 9, 2001
    Messages:
    698
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    San Clemente, Ca
    I've had to deal with this just a few times on customer servers :rolleyes:

    I will usually start out with a fsck block scan on the bad drive. I then mount the partitions of that drive to /mnt/olddrive. Depending on the drive's partitioning you may need to mount multiple partitions under /mnt/olddrive (ex: /mnt/olddrive/usr /mnt/olddrive/var). I then chroot to /mnt/olddrive, cd to /var/cpanel/users, run for i in *;do /scripts/pkgacct $i;done. Once thats done i exit the chroot, copy over the /mnt/olddrive/home/cpmove-* files and restore them...

    There are a few ways to do this... I've also done things like mv all the public_html's out of the way before i package the account so that it goes fast, restore them and them just cp -af the public_html's back inplace...
     
Loading...

Share This Page