H-Sphere Sysadmin Guide

Recovering Unix Hosted H-Sphere Services

 

Related Docs:  

Restoring H-Sphere: Recovering Winbox

This document explains how to restore H-Sphere services on Linux/Unix boxes. You must have all user content and configuration files backed up.

We suggest the following recovery procedure:

Step 1. Download the Installer

  1. Download the latest version of the H-Sphere installation scripts (if you already have the previous version of hsinst.tgz in the current directory, please remove or rename this file before the download):
    # wget http://www.psoft.net/shiv/HS/hsinst.tgz
  2. Untar/ungzip the hsinst.tgz archive:
    # tar xfz ./hsinst.tgz
    and cd into the installation directory:
    # cd ./hsinst

 

Step 2. Generate Configuration Files

On this step, create configuration files from your system database.

  1. If your current H-Sphere hasn't been installed with the 2.3 installer, 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
    1) If you have to re-install all services, type:
    # make install
    2) If you need to install a particular service, type:
    # make add-service S=<SERVICE>
    where <SERVICE> takes one of the following values:
    dns
    mail
    weblite
    web
    mysql
    psql
    DNS Server
    Mail Server
    Webmail server
    Web server
    MySQL server
    PostgreSQL server

 

Step 3. Resolve Possible Conflicts in the System

  • 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/apache.sh 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 PhysicalCreator

To restore your H-Sphere physical resources, log in as the cpanel user and run PhysicalCreator.

Do not confuse the account ID with the server ID you used when generating configuration files. Account IDs could be found in the accounts table of the H-Sphere system database.

 

Step 5. Restore User Content

Copy the backup of user content to the corresponding directories.

To restore databases, create them and then import data from the dump. For example, if you have dumped all databases with pg_dumpall:
# pg_dumpall > db.out
you restore all databases at once:
# psql -f db.out template1
Be prepared that the pg_dumpall utility takes long to execute. Run man pg_dumpall for more details.

 


Related Docs:  

Restoring H-Sphere: Recovering Winbox



© Copyright 1998-2004. Positive Software Corporation.
All rights reserved.