This script has been deprecated in favour of Cella.
This little script performs backups of remote hosts to a location the local host. It's designed to be run on a daily basis and on the first of the month archives the previous month. It's configured via simple configuration file.
You may download a copy of this script to some location on the server that will run the script.
Generally this file is only run by root so it's saved as /root/rhsb.sh, make sure that only root may execute it.
Edit crontab to execute this file accordingly and create a configuration file.
This file determines how rhsb will behave. It specifies a host and what to backup, parameters are seperated by a pipe. In the sample below two hosts are configured for backup. The first host has both database and selected directories in the file system archived. The second host only has the file system archived. Lines that start with a hash mark are ignored.
# host|opts|dirs # opts can be db or fs seperated by : # dirs is paths sepearted by : first_host.mydomain.com|db:fs|/etc:/root:/home second_host.mydomain.com|fs|/etc:/root:/home:/var/spool/nuntius
Some notes on this script: It archives the postgres databases into a hard coded directory on the remote server, this directory should be placed in the backup directory list.
In the example below the archives are saved into /home/edoceo/bak, this should be adjusted for the readers configuration.
Notice that /home is archived from each host, this is how the PostgreSQL backup is saved.
If the rsync is consuming too much bandwidth then adding the parameter of --bwlimit=56 or something will throttle it.
Warning: file_get_contents(): http:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /var/www/edoceo.com/www.edoceo.com/view/creo/remote-host-secure-backup.php on line 47 Warning: file_get_contents(http://cdn.edoceo.com/bin/rhsb.sh): failed to open stream: no suitable wrapper could be found in /var/www/edoceo.com/www.edoceo.com/view/creo/remote-host-secure-backup.php on line 47