This document explains how to restore H-Sphere services (logical servers) on Linux/Unix boxes
based on the system data in the H-Sphere system database. If you are restoring CP running
on a separate server, see Recovering Control Panel.
Since 2.4 Patch 3, H-Sphere comes with a script
to automatically recreate physical servers
with all services installed there. Use it if:
* you need to restore the whole physical box
* you are running H-Sphere 2.4.1 Patch 3 or higher
* the box doesn't run the CP server
You must have all user content and configuration files backed up.
We suggest the following recovery procedure:
Step 1. Download H-Sphere Installer
Download and untar the installer of the H-Sphere version you were running on the crashed server.
If you already have an older version in the current directory,
please remove or rename this file before the download.
Step 2. Generate Configuration Files
On this step, create configuration files from H-Sphere system database.
- If your H-Sphere was installed with the installer older than version 2.3,
collect your current H-Sphere configuration:
- Launch the configuration wizard to enter installation data:
- In the configuration menu, check the ID of the server you want to restore.
- Check if all services on this box are properly configured.
- Save the number of the server that you added a service on in the configuration menu.
- Save configuration and exit with '-' or 's'+'q' commands
# make add-server-ID
where ID is the number of the server that you added the serivce on. This will
regenerate install configuration, upload install scripts to
this server and configure SSH keys to access it.
- Login to the server where you install the new service and execute:
# cd /hsphere/install
A) If you have to re-install all services, type:
# make install
B) If you need to install a particular service, type:
# make add-service S=<SERVICE>
where <SERVICE> takes one of the following values:
dns - DNS server
mail - Mail server
web - Web server
mysql - MySQL server
psql - PostgreSQL server
Step 3. Resolve Possible Conflicts in the System
(outdated since version 2.4)
Skip this step if you have H-Sphere 2.4 and up.
- If you have a mail server and want to add a web server on the same box:
- stop apache on this box by running the following command:
- Linux: /etc/rc.d/init.d/httpd stop
- FreeBSD: /usr/local/etc/rc.d/apache.sh stop
- uninstall webmail apache rpm or package:
- Linux: rpm -e hsphere-apache-lite
- FreeBSD: pkg_delete `pkg_info | grep ^hsphere-apache-lite`
- If you want to add a mail server and don't have a web server, after
'make add-service S=mail' execute:
# make add-service S=weblite
Step 4. Run The Recovery Tool
Web, Mail, MySQL, PgSQL servers: To restore your H-Sphere physical resources,
log in as the cpanel user and
DNS server: For DNS servers, log in as the cpanel user and
run DNS Creator:
java psoft.hsphere.tools.DNSCreator -m db
Step 5. Restore User Content
To restore data from the backup, check with the backup and recovery list
for for this server. Restore listed directories from /var/backup/<ARCHIVE>.tgz
or custom backup directory into the appropriate locations.
More on backup recovery