====== rsbackup-cs Client Installation ====== These are just some notes, with work arounds for some things which made it into the stable release. We'll update the notes as we fix those. Installation consists of grabbing an SVN repository, then manually moving things into their proper place. Note: the server setup is done (in this case) on a FreeBSD server with ZFS file images. ===== Grab the project and move files around ===== # make sure subversion is installed apt install -y subversion mpack gzip # create a directory to put rsbackup_client into mkdir -p /opt/camp/rsbackup cd /opt/camp/rsbackup # get the two things we need from the subversion repository svn co http://svn.dailydata.net/svn/rsbackup/tags/stable/rsbackup_client svn co http://svn.dailydata.net/svn/rsbackup/tags/stable/rsbackup_lib # fix an issue with the repo where the name is wrong mv /opt/camp/rsbackup/rsbackup_client/rsbackup /opt/camp/rsbackup/rsbackup_client/rsbackup_client # Copy our sample config file to the config directory mkdir -p /etc/camp/rsbackup_client cp /opt/camp/rsbackup/rsbackup_client/rsbackup.conf.example /etc/camp/rsbackup_client/rsbackup_client.conf # make an ssh key if one does not exist # just hit enter anytime a question pops up if [ ! -f /root/.ssh/id_rsa.pub ] ; then ssh-keygen -t rsa -b 4096 ; fi ===== Fix some issues with the "stable" version ===== Edit /opt/camp/rsbackup/rsbackup_client/rsbackup_client Add my $transports; at line 144 Edit /etc/cron.d/rsbackup.cron and put in the following contents # Control file for rsbackup # determines when backups will exist, and who will receive any error # reports PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # following may be changed to send failure reports to a different e-mail # account MAILTO=root # daily do a standard backup if previous run has finished #m h dom mon dow user command 00 1 * * * root if ! pgrep rsync ; then /opt/camp/rsbackup/rsbackup_client/rsbackup_client; fi # if you need to kill backup processes after a certain time, uncomment the # following. This would kill any backup jobs running at 7am on any day #0 7 * * * root pkill rsync # EOF ===== Manually edit config file ===== edit config file joe /etc/camp/rsbackup_client/rsbackup_client.conf Change the following values - dry run to true (remove comment) - $MAIL_TO to your backup report e-mail - $BACKUP_SERVER = 'username@backup.server'; - $PATH_ON_SERVER = '/root/backup/path'; - $MY_NAME - $CLIENT_NAME - @DIRS_TO_BACKUP = ('/etc', '/root', '/home', '/opt'); - $LOGDIR - Near bottom (line 103), change the ssh port if necessary ===== Tell server to accept stuff from us ===== cat /root/.ssh/id_rsa.pub On server # copy/paste the output of the above into /root/.ssh/authorized_keys joe /usr/local/etc/rsbackup/rsbackup_server.conf Create space for the new machine. For example, for client Acme, and server server.example.com, you would run zfs create -o quota=10G -o atime=off storage/backups/Acme/server.example.com ===== Test ===== On the client, edit /etc/camp/rsbackup_client/rsbackup_client.conf and change "dry run" to true. Run rsbackup_client from the command line, look for any errors. If no errors, remove (comment out) the dry run parameter and let it run on the next cron cycle.