Recovering Unix Hosted H-Sphere Services

(deprecated in 2.4 Patch 3)


Related Docs:   Restoring H-Sphere from Backup Recreating Unix Hosted Servers Recovering Control Panel Recovering Winbox

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.

  1. If your H-Sphere was installed with the installer older than version 2.3, collect your current H-Sphere configuration:
    # ./import
  2. Launch the configuration wizard to enter installation data:
    # ./configure
  3. In the configuration menu, check the ID of the server you want to restore.
  4. Check if all services on this box are properly configured.
  5. Save the number of the server that you added a service on in the configuration menu.
  6. Save configuration and exit with '-' or 's'+'q' commands
  7. Execute:
    # 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.
  8. 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:
    1. stop apache on this box by running the following command:
      - Linux: /etc/rc.d/init.d/httpd stop
      - FreeBSD: /usr/local/etc/rc.d/ stop
    2. 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 run PhysicalCreator.

DNS server: For DNS servers, log in as the cpanel user and run DNS Creator:

java -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

Related Docs:   Restoring H-Sphere from Backup Recreating Unix Hosted Servers Recovering Control Panel Recovering Winbox

Home   Products   Services   News
© Copyright. . PSOFT. All Rights Reserved. Terms | Site Map