Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Member konrath's Avatar
    Join Date
    May 2005
    Location
    Brasil
    Posts
    314

    Arrow HELP !!. what the best way to recover sites without recover backups?

    Hello

    please, give-me a TIP.

    what the best way to recover sites without recover backups?

    I think

    1) Move the all folders in the home ( OLD HD ) to the new HD
    2) Move all DBs from old HD to new HD
    3) Rebuild the named.conf
    4) Recompile the APACHE
    5) Move passwd and group to new HD
    6) Move all prIvilegs (all files .ACCT) in /var/cpanel/ to new HD
    7) Move the /var/cpanel/users/ to new HD.

    It is the best way?

    Thank you
    Konrath

  2. #2
    Member
    Join Date
    Mar 2004
    Posts
    710

    Default

    The guide I use is this - except I add in the logs, mail sppol, etc and a few other things:

    From: Restoring Cpanel from old drive after crash or hack - The Planet Forums

    So your cpanel server got hacked or crashed? Lots of that going around these days. And if you didn't have cpanel backups of all your sites, then your only option is to copy from the old drive... heres the basics..

    commands to be executed from root shell preceded by #


    In trouble ticket specify to leave the old drive in

    Once the restore is done, SSH in to box..

    mount the old / partition as old

    # mount /dev/hdb3 /old

    run chkrootkit to make sure you don't copy back infected files.. chkrootkit -- locally checks for signs of a rootkit

    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

    mount /tmp as noexec (and symlink /var/tmp to /tmp)
    Lloyd F Tennison

Similar Threads & Tags
Similar threads

  1. Support for programmatically recover backups with clear return codes
    By fernandomm in forum Feature Requests for cPanel/WHM
    Replies: 1
    Last Post: 03-30-2011, 02:44 PM
  2. How do I recover from this?
    By DaNewGuy in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 05-15-2010, 06:43 PM
  3. HELP !!. what the best way to recover sites without recover backups?
    By konrath in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 12-04-2009, 05:44 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube