H-Sphere Updater

(Revised for H-Sphere 3.1+)

Related Docs:   H-Sphere Updater (HS 2.5 and 3.0) hsphere-info hsphere-update H-Sphere Updater Options H-Sphere SSE Updater Options Adding New H-Sphere Servers and Services


H-Sphere admin runs the same updater for H-Sphere installation and update. Moreover, the updater is used to update (and even downgrade) system packages and config file templates. Updater is executed from the corresponding H-Sphere update version.


Main Features

H-Sphere updater's main features:

  • Implemented backward compatibility, particularly for postgres, sitestudio, ipmigration keys.
  • Using set of H-Sphere self-configured packages, which take IP dependent information from config.xml file with the help of the hsinfo utility.
  • MD5 sum check before/after package download.
  • Update of H-Sphere packages to the last set of available packages, allowed by specific H-Sphere version/subversion.
  • Global check of the installed software after update for each box.
  • Possibility to add additional service/server after configuring them via CP interface.
  • Check of the required disk space for installation/update.

Note: H-Sphere updater updates since H-Sphere 2.5 RC 2 (H-Sphere VPS 1.4-4 and up).

H-Sphere Updater consist of two parts:

  • Wrapper which checks and installs, if needed, the hsphere-update package on each box.
  • Set of update scripts installed as the hsphere-update package.


Interactive Mode: Command Line Interface of the Wrapper

H-Sphere updater's interactive mode assumes that you first launch H-Sphere update script, like this:

# sh U30.0P6


# sh U31.0b1 install

And then type in one of the prompted options with or without parameter in the command line of the form that appears.
See H-Sphere updater and H-Sphere SSE updater options.



hspackages  [ help ] [ ips=IP1,IP2,.. ] [ group=lgroup1,lgroup2,... ]
            [ private ] [ strict ] [ nomd5 ] [ force ] [ skip=stage ]
            [ reconfig=front-end|spamassassin|all ]
            [ mode=modename ] [ oscode ] [ mirror=mirror_number ]
            [ exclude-mysql=show|add|del | exclude-postgresql=show|add|del | exclude-dns=show|add|del]
            [ sitestudio ] [ postgres ] [ url=Link ] [ verbose ]
            [ ctemplates=php,httpd,httpd2,cphttpd,httpd_extra,httpd2_extra,cphttpd_extra,ftpd,mysql,pgsql,named ]
            [ edit=IP:/path/to/custom/template ] [ skip-exclude ]
            [ old-platform ]


  • nomd5 - update is not critical for wrong md5 sum, only warning;
  • force - check md5 sum of the installed packages with the same version too, if wrong md5 sum, install new package by force;
  • strict - form package list based exclusively on package list. By default, downgrade to older package version is skipped.
  • ips - only specific list of the target boxes from HS cluster may be pointed instead of provide check update for all IPs in HS cluster;
  • subversion - there is global hsphere package list and its subversion differences.
  • help2 - get additional possibilities description.
  • This key allow to check only subversion check to speed up update (of course, update to corresponding hsphere version is required before);
  • url=Link - alternative path for package download;
  • verbose - inform whether package was installed by force or with nodeps;
  • reconfig=front-end|spamassassin|all (3.0 RC4+) - this option is used in the case of front-end (Horde, PhpMyAdmin, PhpPgAdmin) or SpamAssassin DB location redefinition. It provides the list of boxes allocation where update and/or related reconfiguration is required.
  • ( absent in HS 3.1+) exclude=[show|add:pattern1,pattern2,...|del:pattern1,pattern2,...|del:all |] - show, set or delete list of the package patterns to be skipped during update on all or specified list of H-Sphere boxes.
    hspackages exclude=add:hsphere-php - adds hsphere-php pattern (case insensitive) to an exclude list that is permanently stored in a file on a server. This command does not perform the update
    hspackages exclude=show - shows the exclude list from the file stored on the server
    hspackages exclude=del:hsphere-php - removes the hsphere-php pattern from the exclude list and doesn't update the package
    hspackages exclude=del:all - clears the whole exclude list
    To include the list, run:


    The path to the exclude list stored on the server is /hsphere/shared/etc/excludepkglist
    Pattern - the whole word or a part of a word (case insensitive), e.g. pattern hspackages exclude=add:php excludes all php packages: phpMyAdmin, phpPgAdmin, etc.

    hspackages exclude=add:hsphere-bind ips=
    hspackages exclude=add:mysql-server ips=

    * Use this carefully, as H-Sphere packages have direct correlation with H-Sphere version. This may be used in the the following cases: 1) You have customized version of the specific H-Spshere package; or 2) you update system packages, like MySQL server via native OS package manager, etc.
  • (3.0 RC4+) exclude-mysql=show|add|del | exclude-postgresql=show|add|del | exclude-dns=show|add|del - you can configure H-Sphere to use custom PostgreSQL/MySQL versions instead of installing their HS 3.0 default versions. In this case HS updater allows excluding related package from the H-Sphere update leaving the possibility to update them via native system package managers. Example:

    hspackages exclude-mysql=add ips=

    ( HS 3.1+) the exclude-dns= option allows to exclude standard Bind server in order to use MyDNS server or other custom DNS servers (like djbdns) instead.

  • skip=[check|preparing]
    • check - skip check-up and regeneration of the existing updater.
    • preparing - skip config.xml regeneration on boxes during update.
  • mode=[hsupdate|update|ipmigration|deploy] (in HS 3.0+) - set update mode with one of the options:
    • hsupdate - common update without postgres and sitestudio;
    • update - hsupdate including postgres and sitestudio;
    • ipmigration - reconfiguring IP dependent information;
    • deploy - deploy mode (post-install general box reconfiguration).
  • sitestudio - update SiteStudio to last supported version.
  • postgres - update postgressql to the last supported version.
  • private - private update for testing purpose.
  • ctemplates=php,httpd,httpd2,cphttpd,httpd_extra,httpd2_extra,cphttpd_extra,ftpd,mysql,pgsql,named - Place custom config file templates for comma-separated list of services into predefined locations if custom templates are not there already.

    ( HS 3.1+) the httpd_extra, httpd2_extra, and cphttpd_extra options are used to customize some extra config files respectively for Web server's Apache 1.x and 2.x and for CP Apache. Also the httpd2 option is introduced for Apache 2.2.

  • group - the list of logical server groups, separated by comma. Possible groups: mail, web, dns, mysql, pgsql, cp, vps (using common ips and group tags is allowed).
  • edit=IP:/path/to/custom/template - Edit custom config file template on a specified server in a specified location.
  • slaves=web|mail|all (HS 3.0+) - choose this option to install/update packages on slave servers of load balanced Web/mail clusters.
  • (HS 3.0+) mirror - allow to set another mirror instead of the default one. At this moment available are the following HS servers:
    N  Host             Location   Status
    0  psoft.net        (USA)      default
    1  mirror.psoft.net (Europe)
  • (HS 3.0 Patch 1+) skip-exclude - skip pre-configured exclude package list during current update. Skip pre-defined exclude list that was previously set via exclude

See also other H-Sphere updater and H-Sphere SSE updater options.


Downgrading Packages to the Previous Version

(HS 3.0 RC 1+; HS SSE 3.0 Patch 1+)

Important: This option will work only with the next update! It will not work in 3.0 RC 1!

To downgrade packages to the previous versions, use the following command line option of the wrapper:

Usage: revert pkgs=[ list | package_name,package_name2,.. ] [ help ]


-pkgs=[ list | package_name1,package_name2,.. ] - revert packages separated by ',' character, e.g.:

revert pkgs=hsphere-mrtg-rrd,hsphere-mail-service

If pkgs=list is used then all possible masks of packages are printed, e.g.:



Non-Interactive Mode: Update Script's Command Line Interface

(HS 3.0 RC 1+; HS SSE 3.0 Patch 1+)

Now H-Sphere update script can run in non-interactive mode, i.e., without the need to enter the wrapper and type in the options there. Run the update script with the wrapper's options, like this:

# sh U30.0P6 install cpinstall


# sh U31.0b1 update hspackages ips=IP1,IP2

See H-Sphere updater and H-Sphere SSE updater options.

Related Docs:   H-Sphere Updater (HS 2.5 and 3.0) hsphere-info hsphere-update H-Sphere Updater Options H-Sphere SSE Updater Options Adding New H-Sphere Servers and Services

© .© Copyright. . PSOFT. All Rights Reserved. Terms | Site Map