This document explains how to recover a web server using a built-in
webhosting resource generator utility.
- Log into the control panel as root.
- Back up the content of the ~cpanel/shiva/psoft/ directory.
- Upload archive:
wget http://psoft.net/shiv/HSUpdate-23/CREATOR.tgz
- Unpack archive:
tar xfz CREATOR.tgz
- Change dir to where you have unpacked the archive:
cd CREATOR
- Type 'make install'.
- If necessary, back up all user content as suggested here.
- Log into the control panel server as cpanel user:
su -
su -cpanel
- Run the recovery tool:
java psoft.hsphere.tools.PhysicalCreator OPTIONS
where OPTIONS:
-h|--help - shows the list of available options
-rg|--rgroup - resource group to perform operations on
The following resource groups are allowed:
unixweb - Unix virtual hosting resources
winweb - Windows virtual hosting resources
mysql - MySQL resources
-co|--create-only - performs creation resources routines only
-do|--delete-only - performs delete resources routines only
-rc|--recreate - performs both delete and creation resources routines
-lid|--lserverId - process accounts on logical server with given number
For example, the entire command may look as follows:
bash-2.05a$ java psoft.hsphere.tools.PhysicalCreator -rg unixweb -co -lid 26
In this case the java will create:
- all home dirs with the default H-Sphere content
- configuration of FTP and HTTP virtual hosts on unix logical server with ID 26
This tool will only create/recreate the default content.
- Restore the backup of the ~cpanel/shiva/psoft/ directory.
- Restart H-Sphere.
- If it was the case in step 3, copy user content back from the archive.
- (for Windows) Download the setscrt.exe utility from
http://psoft.net/shiv/WinBox/SetScrt.exe
and run it to set correct NTFS permissions on user home directories:
setscrt.exe -ntfs -owner> setscrt.log
Logs will allow you to see if the tool was run correctly.
|