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 copy or rsync accounts from old drive to new drive ?

Discussion in 'Data Protection' started by calvinphanctt, Sep 26, 2012.

  1. calvinphanctt

    calvinphanctt Active Member

    Joined:
    Mar 27, 2007
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    Hi everyone,

    My primary old hard drive went bad and we had to replace a new hard drive and install new Cpanel and mount the old primary drive as slave.

    On this slave there are several accounts, could you please show me the quickest, easiest way to copy it to the new hard drive (either in WHM or command line in SSH ?)

    Thank you very much !

    Sincerely,
    Calvin
     
  2. vanessa

    vanessa Well-Known Member
    PartnerNOC

    Joined:
    Sep 26, 2006
    Messages:
    817
    Likes Received:
    22
    Trophy Points:
    18
    Location:
    Virginia Beach, VA
    cPanel Access Level:
    DataCenter Provider
    rsync -av /path/to/old/drive /path/to/new/drive

    For example, if your old drive is mounted as /old, with a retained filesystem structured, you would do:

    rsync -av /old/home /home
     
  3. anoop1285

    anoop1285 Member

    Joined:
    Jan 31, 2009
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
  4. pwhjenny

    pwhjenny Well-Known Member

    Joined:
    Aug 31, 2012
    Messages:
    135
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Run these rSync commands to move everything over:

    rsync -vrplogDtH /oldHD/usr/local/apache/conf /usr/local/apache
    rsync -vrplogDtH /oldHD/var/named /var
    rsync -vrplogDtH /oldHD/home/* /home
    rsync -vrplogDtH /oldHD/usr/local/cpanel /usr/local
    rsync -vrplogDtH /oldHD/var/lib/mysql /var/lib
    rsync -vrplogDtH /oldHD/var/cpanel /var
    rsync -vrplogDtH /oldHD/usr/share/ssl /usr/share
    rsync -vrplogDtH /oldHD/var/ssl /var
    rsync -vrplogDtH /oldHD/usr/local/cpanel/3rdparty/mailman /usr/local/cpanel/3rdparty
    rsync -vrplogDtH /oldHD/var/log/bandwidth /var/log
    rsync -vrplogDtH /oldHD/usr/local/frontpage /usr/local
    rsync -vrplogDtH /oldHD/var/spool/cron /var/spool
    rsync -vrplogDtH /oldHD/root/.my.cnf /root
    rsync -vrplogDtH /oldHD/etc/httpd/conf/httpd.conf /etc/httpd/conf

    cd to the old etc directory:

    #cd /oldHD/etc

    And copy some files from here:

    #rsync -vrplogDtH secondarymx domainalias valiases vfilters exim* proftpd* pure-ftpd* passwd* group* *domain* *named* wwwacct.conf cpupdate.conf quota.conf shadow* *rndc* ips* ipaddrpool* ssl hosts /etc
     
Loading...

Share This Page