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

    • Top Command
      Akash Gorane
      [COLOR=rgba(0, 0, 0, 0.9)]'top' command is used to display dynamic real-time information about running processes in the system.[/COLOR] - PID: Shows task’s unique process id. - PR: Stands for priority
      01-12-2023, 05:12 PM
    • Drupal 10 is here, here's all the new features that you will get
      ramankumarlnwebworks
      The latest version of Drupal 10 is all set to release on 14 December 2022. Here are all the features that you will get after you updgrade to drupal 10
      • CKEditor
      • Symfony
      • PHP
      • Composer
      12-06-2022, 02:39 PM
    • 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:

      :
      # 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
    Working...
    X