Anyone can explain me how to back up H-Sphere system data ?
You can back up H-Sphere system data with the help of H-Sphere backup script. It requires postgresql client version 7.1 or higher installed and the psql program available in the system paths on the CP server.
Thanx alemcherry
How to use H-Sphere backup script ?
Backing Up System Data
The backup script is located in the /hsphere/shared/backup directory of the CP server and includes the following files:
hs_bck – the main script file;
hs_bck.cfg – the script configuration file;
hs_bck.txt – description/readme file.
The script backs up
H-Sphere properties file.
SiteStudio properties files.
The main H-Sphere Postgresql DB.
This script does not automatically back up the content of user directories, mail data and DNS settings. To back up user content by means of the backup script, configure the hs_bck.cfg config file by adding user content directories specified below.
You can edit the hs_bck.cfg file to specify the backup storage directory, the number of latest backups to be stored (7 by default), the log file, etc.
Also, H-Sphere includes the /hsphere/shared/scripts/cron/hs_bck file which launches the backup script. For regular automatic backups, add the execution of this file into the CP server crontab configuration. For example, to run the backup script every day at 6:13 AM, add the following line:
13 6 * * * /hsphere/shared/scripts/cron/hs_bck hs_bck.cfg >/dev/null 2>&1
These are the files and directories that are backed up by the script:
H-Sphere and SiteStudio postgres DBs:
hsphere
counter
poll
guestbook
H-Sphere and SiteStudio configuration files:
/hsphere/local/home/cpanel/shiva/psoft_config/*
/hsphere/shared/SiteStudio/psoft_config/*
Can we also Back Up User Content ?
Yes, u can Back Up User Content.
Below is the list of databases, directories and files that need to be backed up in order to preserve all H-Sphere user data.
You can back them up either manually or by the means of the /hsphere/shared/backup/hs_bck script running locally on H-Sphere servers. To configure the script to back up user content, add the corresponding directories to the /hsphere/shared/backup/hs_bck.cfg config file (see /hsphere/shared/backup/hs_bck.txt for the script options).
Control Panel Server
dump all postgresql DBs and back up the postgres content directory (usually, /var/lib/pgsql on your CP server).
~cpanel/shiva/psoft_config/
~cpanel/shiva/shiva-templates/IMAGES/
~cpanel/shiva/custom/
/hsphere/shared/SiteStudio/psoft_config
/hsphere/shared/SiteStudio/var/websites/
If the database is large, the dump can take several hours to complete. You can speed it up by setting
fsync=off
in postgresql.conf. When you are done, unset this option back for safety reasons.
DNS Server
/etc/named.conf
/hsphere/local/var/named/
Web Server
/hsphere/local/home/ (users’ dirs)
/hsphere/local/config/ (httpd and ftp configs)
/usr/local/frontpage/ (frontpage configs)
Mail Server
~vpopmail/domains/
~vpopmail/etc/
~qmaild/users/
~qmaild/control/
MySQL Server
~mysql/
PostgreSQL Server
Dump all user DBs at once with the pg_dumpall utility:
pg_dumpall > db.out
(pg_dumpall might need to connect several times to the PostgreSQL server, asking for a password each time. It is convenient to have the $HOME/.pgpass file in such cases. See man pg_dumpall for more details.)
Note: dump file is created with 644 permissions by default; you need to set more secure 600 permissions to prevent the data from being read by other users:
chmod 600 db.out
It is also very helpful to back up the postgres content directory (usually, /var/lib/pgsql on your PGSQL box).
Leave a Reply
You must be logged in to post a comment.