Announcement

Collapse
No announcement yet.

cPanel Crash Drive Recovery

Collapse
X
Collapse

  • cPanel Crash Drive Recovery

    Hi,

    I hope this topic will be helpful for all of you..

    You have a server whose disk is crashed for some reason and you have been provided with a new disk with OS and cPanel installed on it (SDA). The old drive is attached to the disk and this will be the second disk on the server (SDB)

    Check what partition contained the data through below command:

    Code:
    # fdisk -l
    Once you find the partition, you can mount it to /old_drive
    Code:
    # mkdir /old_drive
    
    # mount /dev/hdb3 /old_drive
    Verify the home directory is present:
    Code:
    # ls /old_drive/home
    Begin the recovery using below commands:

    Code:
    # rsync -vrplogDtH /old_drive/usr/local/apache/conf /usr/local/apache
    
    # rsync -vrplogDtH /old_drive/var/named /var
    
    # rsync -vrplogDtH /old_drive/usr/local/cpanel /usr/local
    
    # rsync -vrplogDtH /old_drive/var/cpanel /var
    
    # rsync -vrplogDtH /old_drive/usr/share/ssl /usr/share
    
    # rsync -vrplogDtH /old_drive/var/ssl /var
    
    # rsync -vrplogDtH /old_drive/usr/local/cpanel/3rdparty/mailman /usr/local/cpanel/3rdparty
    
    # rsync -vrplogDtH /old_drive/var/log/bandwidth /var/log
    
    # rsync -vrplogDtH /old_drive/usr/local/frontpage /usr/local
    
    # rsync -vrplogDtH /old_drive/var/spool/cron /var/spool
    
    # rsync -vrplogDtH /old_drive/root/.my.cnf /root
    
    # rsync -vrplogDtH /old_drive/etc/httpd/conf/httpd.conf /etc/httpd/conf
    Make sure to copy the apache configuration files as per your built based on EA3 or EA4.. This is really important..

    Copy the MySQL data and then home data.. These are usually large in size, so my preferred choice is to do that in the last:

    Code:
    # rsync -vrplogDtH /old_drive/var/lib/mysql /var/lib
    
    # rsync -vrplogDtH /old_drive/home/* /home
    Now, here is the small but main part, i.e., copying the system configuration:
    Code:
    # cd /old_drive/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
    Change the root password immediately, as the password file is also been changed with the above command:
    Code:
    # passwd root
    Now, when all data is moved, you can update the cPanel built using below command:
    Code:
    # /scripts/upcp
    Recheck the EasyApache configuration and rebuild it too to match the modules and PHP versions..

    Once this is complete, the recovery is done. At this time, a reboot may not be required, but if there is any kernel update, please do install it and reboot the machine once.


    I hope that has been informative for you and I would like to thank you for viewing it.
    Last edited by Jayant R. Danech; 10-05-2018, 04:00 PM.
      Posting comments is disabled.

    Categories

    Collapse

    Latest Articles

    Collapse

    • Common Used OpenVZ Commands:
      Jayant R. Danech
      Hello Everyone,

      This article covers most commonly used OpenVZ commands that can be useful for system administrator who are using OpenVZ:

      1. To list running VPSs on the node:
      [Command ]# vzlist

      :
      Example:
      # vzlist
            CTID      NPROC STATUS    IP_ADDR         HOSTNAME
             101        112 running   xx.xx.xx.xx  server1.24x7.com    
             102         54 running   xx.xx.xx.xx  server2.24x7.com
      2. To list all running
      ...
      10-06-2018, 11:40 AM
    • cPanel Crash Drive Recovery
      Jayant R. Danech
      Hi,

      I hope this topic will be helpful for all of you..

      You have a server whose disk is crashed for some reason and you have been provided with a new disk with OS and cPanel installed on it (SDA). The old drive is attached to the disk and this will be the second disk on the server (SDB)

      Check what partition contained the data through below command:

      Code:
      # fdisk -l
      Once you find the partition, you can mount it to /old_drive
      ...
      10-05-2018, 03:46 PM
    • Error Codes
      Jayant R. Danech
      Error codes and their descriptions:

      Error Code 300 [Multiple Choices]
      Description: Description:The URI refers to more than one file. The server may respond with an error message or a list of options.

      Error Code 301 [Moved Permanently]
      Description: The page has been permanently moved. The client will normally perform a redirection to the new URL. References to the old URL should be updated.

      Error Code 302 [Moved Temporarily]
      Description:
      ...
      09-21-2018, 12:56 PM
    • Javascript Frameworks and Libraries to Learn in 2018
      Mangesh Thakur
      Take a quick look of projects on GitHub and you’ll realize that there are over 1 million JavaScript projects. In this article we’ll take a look at some of the JavaScript frameworks that were a big hit in 2017 and which you should try and take advantage of.

      One thing to note is that the popularity of JavaScript frameworks is ever changing. So, what might be in today may not be in tomorrow.
      Let’s begin by defining what a framework is.

      Think of a car. Every working...
      01-04-2018, 06:54 PM
    • Cloud and Host Server Security: Tips and Tricks to ensure safety
      Administrator
      The number of cloud users is increasing year after year. For a safe and secure storage, cloud server has become an eminent option to keep the information intact and safe. Emails are rarely chosen these days to send a bunch of photos or usages of USB or flash drives has also become rare to carry documents.



      The question of security of servers arises in the case of both whether the servers are physically hosted or virtually kept. Few tips and tricks we are mentioning below...
      12-27-2017, 07:00 PM
    • The best wordpress plugins you must make use of:
      Mangesh Thakur
      To Popularize, enhance Security and performance of WordPress site switch over to Plugins

      To enlarge and develop the performance of the WordPress site plugins are introduced as a part of the software system. The software can be uploaded to the version of WordPress site which makes it stay in demand amongst the users very frequently. Being a self-hosted website, the basic advantage of using it is the uploading of plugins.
      Premium Version vs. Free version plugins

      There...
      12-15-2017, 05:35 PM
    Working...
    X