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.

Restoring a server

Discussion in 'General Discussion' started by zmenchhofer, Mar 21, 2005.

  1. zmenchhofer

    zmenchhofer Member

    Joined:
    Jun 16, 2004
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    hello.... my HD was diing in my server so i had my DC install a new PRI HD and reinstall the OS/cpanel. how ever they would not do a ghost but they would hook my old HD up as a slave so i still have access to it is there away to copy all the config/files over? please help URGENT!!

    THank you

    Zachary!!
     
  2. theuruguayan

    theuruguayan Active Member
    PartnerNOC

    Joined:
    Jul 6, 2003
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    mount the old / partition as old

    # mount /dev/hdb3 /old
    now we can start copying back data from the old drive

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

    then change to the old etc, and execute all on one line ...

    # cd /old/etc

    # 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

    well I hope I got everything... after you move all that stuff you will find yourself fixing up little things here and there....

    I recomend updating cpanel afterwards .. /scripts/upcp .. /scripts/updatenow .. /scripts/sysup .. /scripts/fixeverything

    update exim .. /scripts/exim4

    Once everything works.. make sure you don't get 0wn3d again...
    update apache .. /scripts/easyapache
    update kernel to latest (plenty of howto's on these forums)
    mount /tmp as noexec (and symlink /var/tmp to /tmp)

    http://forums.ev1servers.net/showthread.php?t=38797&highlight=restore+cpanel <- for more info.
     
Loading...

Share This Page