BuycPanel Blog

BuycPanel Blog

Latest news and updates

How to Recover cPanel From Crashed Hard Disk

Posted by Jamison on 01 12 2015.

A crashed hard drive is sure to drive you mad, especially if the files in the drive were not properly backed up. For web managers, this problem can also be mind-blowing especially if all the data pertaining to the website and domain in cPanel have also been compromised because of the problematic hard disk.

 

If you are in this situation, the best you can do is to stop panicking and keep your act together. There is a chance that files can be recovered if you just know what to do. Follow the steps below to check if you can recover your cPanel server from your non-functioning HDD.

 

	 Get a new HDD and Operating System

 

Before you throw out your crashed hard drive, you might want to try to salvage its files by using a new HDD and operating system. If you have available drive lying somewhere in your house, you don’t have…

A crashed hard drive is sure to drive you mad, especially if the files in the drive were not properly backed up. For web managers, this problem can also be mind-blowing especially if all the data pertaining to the website and domain in cPanel have also been compromised because of the problematic hard disk.

 

If you are in this situation, the best you can do is to stop panicking and keep your act together. There is a chance that files can be recovered if you just know what to do. Follow the steps below to check if you can recover your cPanel server from your non-functioning HDD.

 

  1. Get a new HDD and Operating System

 

Before you throw out your crashed hard drive, you might want to try to salvage its files by using a new HDD and operating system. If you have available drive lying somewhere in your house, you don’t have to buy a new one. But if there is none, head to your nearest data center and get one immediately. You can then attempt to migrate your cPanel server from the old non-working drive to a new server, hopefully without losing any files or data.

 

  1. Start Mounting the Old HDD Drive

 

The first step is to obtain partitions from the old and new drives using the # fdisk -1 command. Next, use the # df –h code to see if there are mounted drives. Finally, you have to mount the old problematic HDD using the # mount /dev/hdb3 /oldHD command.

 

  1. Browse Old Files

 

After you have successfully mounted the old drive, you can use the # ls /oldHD/home command to browse the files.

 

  1. Move the Old Files to the New Hard Drive Using Rsync

 

In order to achieve this very important step, you need Rsync command. This will enable you to sync the two directories as well as transfer new data to the server. When using this command, however, you should not forget to include the ending slashes on both the source as well as the destination.

 

After you run this command and copy the files properly, the cPanel will start to recognize old users and files.

 

  1. Run cPanel Fix Scripts and All Updates

 

Before anything else, you should remember to run all software updates as well as fix all scripts in your cPanel. Running fixeverything script is crucial so don’t forget to do it. However, even after running the script, you might encounter restart problems. Don’t fret. What you need to do next is to log into your WHM or cPanel and proceed to rpm installer. Then, you force install opensshd, opensshd-server, and opensshd-client. Finally, try to restart sshd using WHM.

 

These are all the steps you need to recover your files and data from your old HDD that has crashed. Just make sure that you follow directions carefully and research all the Rsync and script codes that you ought to use. They are important in ensuring a stress free and problem free data migration.

 

Lastly, it is also possible to use your cPanel to create a backup account from your crashed HDD. But the steps you need to follow for this purpose are different from the steps enumerated above.