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 move data from one hard drive to another for cpanel/OS reinstall?

Discussion in 'General Discussion' started by frogee, Aug 5, 2003.

  1. frogee

    frogee Member

    Joined:
    Feb 4, 2003
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    I need to find out the following:

    My datacenter setup the partitions for our server wrong. They only gave us 14 gigs on the home partition instead of like 60 gigs. Therefore, they said they need to reinstall the OS (red hat 9.0) and then they will have to move the data back onto the server.

    This is what they said:

    "I will keep your current drive mounted till we transfer the data and install cpanel for you but i don't know how to transfer your clients' data between drives so they'll stay in new cpanel. ask cpanel support how to move the accounts between drives in untouched shape so cpanel can still see and manage them..."

    What do we need to do? We have gigs and gigs (almost 13 gigs) of data to move. We can't lose any data and we can't have much downtime at all. Thanks!

    cPanel.net Support Ticket Number: 20181
     
  2. shaun

    shaun Well-Known Member

    Joined:
    Nov 9, 2001
    Messages:
    698
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    San Clemente, Ca
    here's what you need to copy over from the other drive..


    /home/
    /etc/named.conf
    /etc/proftpd.conf
    /etc/localdomains
    /etc/httpd/conf/httpd.conf
    /usr/local/apache/conf/httpd.conf
    /etc/group
    /etc/shadow
    /etc/passwd
    /etc/domainalias
    /etc/fstab
    /root/.my.cnf
    /etc/ips
    /etc/reservedips
    /etc/quota.conf
    /etc/wwwacct.conf
    /etc/rndc.conf
    /etc/secondarymx
    /etc/my.cnf
    /usr/local/cpanel/3rdparty/interchange/interchange.cfg
    /etc/valiases
    /etc/proftpd
    /var/named
    /etc/vfilters
    /var/cpanel
    /var/spool/cron
    /usr/local/frontpage
    /var/log/bandwidth
    /usr/share/ssl
    /etc/ssl
    /var/ssl
    /usr/local/cpanel/3rdparty/mailman

    cPanel.net Support Ticket Number:
     
  3. pguy

    pguy Well-Known Member

    Joined:
    Feb 21, 2003
    Messages:
    73
    Likes Received:
    0
    Trophy Points:
    6
    Hello Shaun,

    I had just come to post such a query and saw this post. I need a little clarification. I'll try to explain what we need to do.

    We already have a server A and want to move all the data to server B in the same DC. We want to build an entirely new server B with new hard drives.

    Although the config, RH ver , settings will be different, would it be possible to move the data from server A manually to server B without any downtime ?

    The reason being Server A's hard drive is acting weird and we want to take this chance to move everything to a new better server and drive.


    Err.. if I have confused this issue beyond recognition.. please let me know..

    Is there a way to do this.


    Thanks for your time and patience.

    cPanel.net Support Ticket Number:
     
  4. Keegan

    Keegan Well-Known Member

    Joined:
    Oct 22, 2001
    Messages:
    110
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    ghost server a (Drive) to server B (Drive)

    cPanel.net Support Ticket Number:
     
  5. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    You can also do without reinstalling. Resize your existing partitions using any utility, then format those partitions and mount them as /home1 and so on. Edit your server setup from WHM and give it the home1 with home to create accounts in.

    Will save you a lot of trouble.

    my 2 cents.

    cPanel.net Support Ticket Number:
     
  6. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    Will your ips change ?? Because if they do then you are looking for trouble.

    There is another way to do it. Setup the main domain of your existing server A on server B. Make the nameservers on server B identical to server A. Now change the ips at your register for the first nameserver to the new server B (don't change the second now). Meanwhile use WHM to copy all the data, couple of hrs max.

    Wait for 48 hrs and check from different locations with dns query tools etc. Then shift the second ip also.

    I did this once for a box of mine with the same probs. Ofcourse you need to cross your fingers that the hdd lasts for that long. ::kidding:: Best of you luck.

    cPanel.net Support Ticket Number:
     
  7. frogee

    frogee Member

    Joined:
    Feb 4, 2003
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    That sounds easy enough....but I would lose all of the data right? I have to keep all data....almost 13 gigs.

    cPanel.net Support Ticket Number:
     
  8. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    Do a df -h on shell and post it here. I can then explain you better. No it won't create any probs with the data.

    cPanel.net Support Ticket Number:
     
  9. frogee

    frogee Member

    Joined:
    Feb 4, 2003
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Filesystem Size Used Avail Use% Mounted on
    /dev/hda7 1011M 276M 684M 29% /
    /dev/hda3 99M 5.2M 88M 6% /boot
    /dev/hda10 14G 13G 475M 97% /home
    none 251M 0 250M 0% /dev/shm
    /dev/hda8 1011M 33M 927M 4% /tmp
    /dev/hda5 41G 4.8G 33G 13% /usr
    /dev/hda9 14G 260M 12G 2% /var
    /dev/vg01/lv_data 2.5G 33M 2.3G 2% /data

    cPanel.net Support Ticket Number:
     
  10. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    I guess you want to take space from /usr and /var ??

    First backup your /usr and /var (if you want to take space from this as well) so that incase we run in trouble / data from these partition is currupted we can just copy them back. You can create a temp directory in /home and copy them. Do remember to turn down all services like http, exim, cpanel, mysqld etc so that they are not using any files from these partitions while we do this job.

    You can use fips to then resize the partition. Once the partition is resized, use fdisk to create more partitions in the new free space. Format them and mount them as /home1, /home2.

    I don't think there should be any trouble with your home directory where all your data is stored. Just be sure to use partition resizer on the correct partition.

    cPanel.net Support Ticket Number:
     
  11. frogee

    frogee Member

    Joined:
    Feb 4, 2003
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    so this will then create a home1 and home2 and I will still have the same home drive too? So the data will still be on the home drive?

    cPanel.net Support Ticket Number:
     
  12. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    YES. You would need to edit setup in WHM to include home1 and home2 besides home to setup accounts inside.

    cPanel.net Support Ticket Number:
     
  13. frogee

    frogee Member

    Joined:
    Feb 4, 2003
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    But where would we put the data on the home drive while we are formatting everything? It will have to be moved somewhere right? We can't lose ANYTHING. Thanks again!

    cPanel.net Support Ticket Number:
     
  14. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    You will only be formating the new partition and not the home partition. You can ask ur noc guys to resize it for you if you feel insecured. Since we don't touch home partition, data still stays there.

    cPanel.net Support Ticket Number:
     
  15. pguy

    pguy Well-Known Member

    Joined:
    Feb 21, 2003
    Messages:
    73
    Likes Received:
    0
    Trophy Points:
    6
    I don't think the server will work as they are on different configurations. Ghost should for similar configured servers with the same hardware.


    Anand : Yours is the way to do it if there is no final choice. Use the WHM copy function. In our case it would take around 24hours to complete the move. That's the reason I was wondering if it was possible to make such a hd to had change as shaun had pointed out in the post.


    Regards,

    cPanel.net Support Ticket Number:
     
  16. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    pguy: shaun's solution is when you want to backup everything on the box and then remake the partitions. But the guy wants his data to be safe, and the disk space is left in a partition which itself has to be removed and repartitioned (see df -h of the user).

    As for your case, whm copy was anyways the best.

    cPanel.net Support Ticket Number:
     
  17. netazoid

    netazoid Member

    Joined:
    Mar 13, 2002
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    mysql dbs!

    forgot this in the list:
    /var/lib/mysql

    cPanel.net Support Ticket Number:
     
  18. jmweb

    jmweb Well-Known Member

    Joined:
    Aug 8, 2003
    Messages:
    77
    Likes Received:
    0
    Trophy Points:
    6
    can anyone confirm if this worked or not?

    cPanel.net Support Ticket Number:
     
Loading...

Share This Page