1 / 3

Rebuilding Userdata Files

Userdata files need to be rebuilt when the server's userdata files either get corrupted or cease to exist. Certain steps need to be followed to rebuild userdata files from a recent backup.

htshosting
Download Presentation

Rebuilding Userdata Files

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. We begin disseminating information on the topic of “Rebuilding Userdata Files” by issuing a warning that the steps mentioned for this purpose should not be carried out unless you are totally sure that the userdata files of your server are either corrupt or do not exist. These steps should only be considered when it is certain that no other method can resolve the issue. Userdata files are the files that are contained in the /var/cpanel/userdata/ directory for each account. There can be certain situations in which the userdata files of your server might get corrupted or these might cease to exist. During such a situation these files need to be rebuilt. There are two ways or methods for rebuilding userdata files. One of these methods involves the use of a valid httpd.conf file. If a valid httpd.conffile isn’t present, then the userdata files have to be rebuilt from a recent backup. Hence, the method that gets used for this purpose depends on either the existence or the absence of a valid httpd.conf file on your server. If a valid httpd.conf file exists, then the userdata files are rebuilt from a valid httpd.conf file. If a valid httpd.conf does not exist, then the userdata files are rebuilt from a recent backup. Here, we shall describe the process of rebuilding userdata files from a recent backup. The steps that are about to be mentioned are based on the assumption that you are logged in to your server via SSH, and that you have logged in as the root user. Rebuilding Userdata Files from a Recent Backup The below-mentioned steps are used to rebuild userdata files from a recent backup. It is strongly recommended to rebuild userdata files from a valid httpd.conf file, if such a file exists on your server. If that file does not exist, then you should follow the steps that are being mentioned here. Copy the Corrupt Userdata Directory to a New Location

  2. You need to copy the userdata directory that currently exists on your server, along with its contents, to the cpanel directory. You will have to run the following command for this purpose: cp -rfp /var/cpanel/userdata /var/cpanel Create and Navigate to a New Directory Next, you should create a new directory within the root directory, and subsequently navigate to it. You have to run the below-mentioned command for this purpose. mkdir /root/example && cd /root/example In the above-mentioned command, the term “example” represents the name of the new directory. Extract the Contents of Your Backup File Now you need to extract your backup file’s contents to the new directory. The method that should be used for extracting the backup depends on the backup file’s type. Let us understand this with the aid of an example. Suppose your backup file is a .tar.gz file, then you need to run the following command. tar -zxvf backup.tar.gz In this command, “backup.tar.gz” is meant to represent the absolute path to the backup file. Run the updateuserdatacache Script You need to run the script, updateuserdatacache, for updating the cache of the system. The script, /scripts/updateuserdatacache, ensures that the system caches all the userdata files properly. For this purpose, you will have to run this command: /scripts/updateuserdatacache Rebuild Apache You have to rebuild Apache in order to use the userdata files that have been rebuilt. To attain this, you have to run the below-mentioned command. /scripts/rebuildhttpdconf Restart Apache Post rebuilding Apache, you need to restart it on your server. Run the following command to get this done. /scripts/restartsrv_httpd The process of rebuilding userdata files from a recent backup, comes to a successful completion with this final step.

  3. To digress, the talk about servers brings to mind the fact that the Virtual Private Servers (VPS) of HTS Hosting are powerfully configured to deliver outstanding performance at very low prices. That’s why our Managed Windows VPS, Managed Linux VPS, Self Managed Windows VPS, and Self Managed Linux VPS are highly sought after by our clients from various parts of the world. Source: https://www.linkedin.com/pulse/rebuilding-userdata-files-hts-hosting

More Related