UnixServerAdmin

Server Administration & Management

How to recreate files in /var/cpanel/userdata

You can create /var/cpanel/userdata by one of the main directory replaced is /var/cpanel/userdata. This contains the username/main and username/main.cache file which has the client domain in it. This is following way to recreate it :-

1. Take the backup of /var/cpanel/userdata

# cp /var/cpanel/userdata /var/cpanel/userdata.bak

2. Run /usr/local/cpanel/bin/userdata_update –reset so that /var/cpanel/userdata can be regenerated.

# /usr/local/cpanel/bin/userdata_update –reset

3. Move the required files from new /var/cpanel/userdata to old one.

4. Move the old /var/cpanel/userdata back after copying the required files.

5. Rebuild Apache conf

# /usr/local/cpanel/bin/build_apache_conf

6. Restart Apache.

# /etc/init.d/httpd stop

# /etc/init.d/httpd start

Advertisements

June 15, 2011 Posted by | cPanel | , | Leave a comment