Troubleshoot - by Hostrare
Restore the Cpanel server from the damaged drive. If your server drive got damaged and want to recover data from it then you can use the following steps to recover data from the problematic drive.
Rsync holds for remote sync. rsync is applied to perform the backup service in UNIX / Linux. rsync benefit is applied to synchronize the reports and files. We can use this to recover the database from a corrupt drive.
Ask your DC to connect corrupted drive as secondary drive and mount drive as olddrive folder
mount /dev/sdc /olddrive
We can light the following backup data from the old drive
If possible, do this method through SCREEN.
rsync -vrplogDtH /olddrive/usr/local/apache/conf /usr/local/apachersync -vrplogDtH /olddrive/var/named /varrsync -vrplogDtH /olddrive/home/* /homersync -vrplogDtH /olddrive/usr/local/cpanel /usr/localrsync -vrplogDtH /olddrive/var/lib/mysql /var/librsync -vrplogDtH /olddrive/var/cpanel /varrsync -vrplogDtH /olddrive/usr/share/ssl /usr/sharersync -vrplogDtH /olddrive/var/ssl /varrsync -vrplogDtH /olddrive/usr/local/cpanel/3rdparty/mailman /usr/local/cpanel/3rdpartyrsync -vrplogDtH /olddrive/var/log/bandwidth /var/logrsync -vrplogDtH /olddrive/usr/local/frontpage /usr/localrsync -vrplogDtH /olddrive/var/spool/cron /var/spoolrsync -vrplogDtH /olddrive/root/.my.cnf /rootrsync -vrplogDtH /olddrive/etc/httpd/conf/httpd.conf /etc/httpd/conf
Copy all old drive /etc folder configuration files.
cd /olddrive/etcrsync -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
Updating scripts and restarting services:
/scripts/upcp/scripts/updatenow/scripts/easyapache/scripts/securetmp/scripts/fixeverything
Restarting services as:
/scripts/restartsrv httpd/scripts/restartsrv cpanel/scripts/restartsrv mysql/scripts/restartsrv named/scripts/restartsrv exim
Done… Thats all!!!
If you need to restore data to remote server then copy files to remote server. Enable SSH key authorized login without root password between both servers.
Go to old serve which is corrupted drive.
cd /etcrsync -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 root@84.23.43.45:/etc
(84.23.43.45 is assumed as the IP of the new server to which we are moving the data.)
Now we need to transfer everything else.
rsync -vrplogDtH /usr/local/apache/conf root@84.23.43.45:/usr/local/apachersync -vrplogDtH /var/named root@84.23.43.45:/varrsync -vrplogDtH /home/* root@84.23.43.45:/homersync -vrplogDtH /usr/local/cpanel root@84.23.43.45:/usr/localrsync -vrplogDtH /var/lib/mysql root@84.23.43.45:/var/librsync -vrplogDtH /var/cpanel root@84.23.43.45:/varrsync -vrplogDtH /usr/share/ssl root@84.23.43.45:/usr/sharersync -vrplogDtH /var/ssl root@84.23.43.45:/varrsync -vrplogDtH /usr/local/cpanel/3rdparty/mailman root@84.23.43.45:/usr/local/cpanel/3rdpartyrsync -vrplogDtH /var/log/bandwidth root@84.23.43.45:/var/logrsync -vrplogDtH /usr/local/frontpage root@84.23.43.45:/usr/localrsync -vrplogDtH /var/spool/cron root@84.23.43.45:/var/spoolrsync -vrplogDtH /root/.my.cnf root@84.23.43.45:/rootrsync -vrplogDtH /etc/httpd/conf/httpd.conf root@84.23.43.45:/etc/httpd/conf
Dont forget to change remote server ip address in configuration.
replace to 84.23.43.45 — /var/named/*.dbreplace to 84.23.43.45 — /usr/local/apache/conf/httpd.conf
Then updating scripts and restarting services…
our suuport team here for you 24/7
+8801977507015support@hostrare.comsend a leter Whether you are looking for a personal website hosting plan or a business website hosting plan, We are the perfect solution for you. Our powerful website hosting services will not only help you achieve your overall website goals, but will also provide you with the confidence you need in knowing that you are partnered with a reliable and secure website hosting platform.