How to restore all data from old drive to a new drive on a cpanel server

You basically ssh to server as root and look for your old/original drive via command

fdisk -l

Then say you find your data on /dev/sdb3 then you just type

mkdir /sdb3

mount /dev/sdb3 /sdb3

 

 

rsync -vrplogDtH /sdb3/usr/local/apache/conf /usr/local/apache

rsync -vrplogDtH /sdb3/var/named /var

rsync -vrplogDtH /sdb3/home/* /home

rsync -vrplogDtH /sdb3/usr/local/cpanel /usr/local

rsync -vrplogDtH /sdb3/var/lib/mysql /var/lib

rsync -vrplogDtH /sdb3/var/cpanel /var

rsync -vrplogDtH /sdb3/usr/share/ssl /usr/share

rsync -vrplogDtH /sdb3/var/ssl /var

rsync -vrplogDtH /sdb3/usr/local/cpanel/3rdparty/mailman /usr/local/cpanel/3rdparty

rsync -vrplogDtH /sdb3/var/log/bandwidth /var/log

rsync -vrplogDtH /sdb3/usr/local/frontpage /usr/local

rsync -vrplogDtH /sdb3/var/spool/cron /var/spool

rsync -vrplogDtH /sdb3/root/.my.cnf /root

rsync -vrplogDtH /sdb3/etc/httpd/conf/httpd.conf /etc/httpd/conf

rsync -vrplogDtH /sdb3/etc/sysconfig/network /etc/sysconfig

Now copy files from /etc:

cd /sdb3/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

Then finally run following to fix any issues that might happen.

/scripts/upcp

/scripts/updatenow

/scripts/sysup

/scripts/fixeverything

 

 

Bu cevap yeterince yardımcı oldu mu?

 Bu dökümanı yazdır

Also Read

Hypervm Xen Windows VPS Network not showing 1Gbps

If you're running HyperVM Xen VPS and your Windows vm somehow not showing 1Gbps port, only...

My raid-10 speed seems slow when test using hdparm

See http://tldp.org/HOWTO/Software-RAID-HOWTO-9.html To check out speed and performance of your...

Fix WHM/cPanel cPHulk Brute Force Protection Lock Out Via SSH

ssh to the server and login as root then type   mkdir /home/cphulkchmod 777...

How to install lm_sensors on XenServer

This is tested on Xenserver 6, may also work on other similar OS 1. ssh to server as root 2....

How to set date/time permanently on Centos/RH/Fedora

First you need to ssh to the server and be root and then do these step by step: 1. Set the...