This document explains how to back up H-Sphere system and user data by means of the H-Sphere backup script.
Currently, the script backs up only the Control Panel server with the PostgreSQL system database. It requires PostgreSQL client version 7.3 or higher installed and the psql program available in the system paths on the CP server. To manually back up H-Sphere content on Unix servers, see the backup and recovery list of H-Sphere related directories and files.
We recommend that you set up a separate server to store backup archives.
Each H-Sphere server has a copy of the backup script located in the /hsphere/shared/backup directory. The script includes the following files:hs_bck - the main script file (you can only run the script on the CP server);
hs_bck.cfg - custom configuration file. This is the file to store the list of directories to back up.
hs_bck.cfg.org - default configuration file. It can be overwritten with H-Sphere updates. This is where you can find the updated list of parameters to the hs_bck script if it has been changed in a new version.
hs_bck.txt - description/readme file.
Depending on the server, you need to configure the script by editing the hs_bck.cfg file.
To back up H-Sphere CP server:
- Log into the CP server as root:
- cd into the backup script directory:
- Make sure the files hs_bck.cfg and hs_bck.cfg.org are identical in what is not your custom settings. The format of the hs_bck.cfg.org file may change with H-Sphere updates, and it is important to ensure that the backup script is launched with correct parameters.
- In hs_bck.cfg, edit the list of directories and databases to back up. See the backup and recovery list for each type of server.
- In hs_bck.cfg, edit the the backup storage directory, the number of latest backups to be stored (7 by default), the log file, etc.
- Run the backup script.
- For regular automatic backups, add the execution of the hs_bck file
into the CP server crontab configuration, e.g.:
<TIME> /hsphere/shared/backup/hs_bck hs_bck.cfg 2>&1 > /dev/nullFor example, to run the backup script every day at 6:13 AM, add the following line:13 6 * * * /hsphere/shared/backup/hs_bck /hsphere/shared/backup/hs_bck.cfg 2>&1 > /dev/null
- For additional parameters to this script, please run:
- For regular automatic backups, add the execution of the hs_bck file into the CP server crontab configuration, e.g.: