Recovery cpanel dari Hdd Lama


Status
Not open for further replies.

galuh82

Hosting Guru
Verified Provider
Saya pernah mencoba melakukan itu saat saya melakukan upgrade HD dari 250 GB ke 320 GB dan saya bisa konfirmasikan cara ini valid dan berjalan lancar.

tingkat keberhasilan relatif, mungkin 99% untuk recover dari hdd yang kondisinya bagus (error/bad). berikut saya copy emailnya:

Please do not use the tutorial you mentioned. It suggests using rsync to copy a large number of files that may or may not be in good condition and may not match the new server's configuration. Using rsync to blindly copy over files from a failed hard drive will cause more problems than it can solve.

The absolute best way to recover from a failed hard drive is to install the operating system and cPanel, and restore your accounts from good backups that were made using the cpbackup system before the hard drive failed.

If you do not have good backups made using the cpbackup system, it is still possible to recover at least most of the account data. Do the following:

- Install the operating system on the new hard drive.

- Mount the old hard drive to a directory, something old /olddrive or /baddrive or something easy to remember.

- Copy the /var/cpanel/cpanel.config and /etc/wwwacct.conf files from the old hard drive to the new hard drive. Optionally, also copy the EasyApache build profile from the old hard drive to the new hard drive. The following documentation explains how to find the EasyApache build profile:

http://docs.cpanel.net/twiki/bin/view/EasyApache3/DistributingEA3Profiles

- Install cPanel. cPanel will use the options in the /etc/wwwacct.conf, /var/cpanel/cpanel.config, and EasyApache build profile files that you used.

- Stop MySQL.

- Edit /etc/my.cnf and change the value for basedir= to point to the MySQL base directory on the old hard drive.

- Start MySQL.

- Use chroot to make the old hard drive's directory the root directory.

The old hard drive is now the root directory for all operations, and MySQL is running using its directory on the old hard drive as its base. This now means that you should be able to make a good backup of your accounts "the cPanel way" and end up with archives of the accounts that can be restored easily.

- Use cpbackup to start a backup process of all accounts. Typically cpbackup --force will do this.

Once the backup process is finished:

- Exit the chroot environment.

- Copy the account archive files from the backup destination on the old hard drive, to a convenient location on the new hard drive.

- Restore the account backups.

This is a long process, but this should back up the accounts using cPanel's backup system, then restore them, and it greatly minimizes the risk of creating new problems by blindly using rsync to copy many files that may themselves be corrupt from the old hard drive. We do not endorse the tutorial you mentioned and we strongly advise against using it.

We cannot carry out the actions I described for you, but this should give your server administrator a good start.

In the future, implementing a backup regime using cpbackup to store the archives on a different hard drive or even in a different physical location (using FTP) will help to avoid this kind of very inconvenient recovery procedure that we cannot directly support.


--
Jared Ryan
Technical Analyst 2
cPanel, Inc.
 
Status
Not open for further replies.

Top