For some time now, the making of good, acceptable backups has been causing problems. These problems are being exacerbated by the ever growing capacity of hard drives. Whereas, not long ago, a single hard drive could easily be backed up onto a tape, the situation is now that backing up a single 120Gb HDD simply cannot be done to tape - at least, not an affordable tape.
I have experimented with doing 'tar ... <everything>' and 'tar ... <selected things>' to both local and remote hard drives, but this method needs constant maintenance if things are to be kept under control.
In line with my policy of assuming that someone somewhere will have solved my problem - if not completely then partially - I was again searching the Internet the other day when I came across a product called 'Box Backup'. To my delight, as far as I can yet determine, this little system solves my present backup problems.
In a nutshell, this product consists of two parts - a backup server and a backup client. The backup server just sits there waiting to be told what to backup, and the client works on the machine where files need to be backed up sending the backup server the files to archive. The whole system works continuously and on an incremental basis so that files marked for backup gradually get pushed across to the backup archive on the backup server and everything is kept up-to-date automatically.
More information on this very useful product can be found on
http://www.fluffy.co.uk/boxbackup.
I have implemented this system on my test rig using the following. You'll have to experiment to see just how much in the way of development RPMs you need. Alternatively, I could upload the compiled versions to somewhere on contribs if someone would be kind enough to donate some space.
Setup as follows:
The 'Site Production Server' requiring backups - SME 5.6 called Earth
The SME server whose job it is is to hold backups - SME 6.0.1-01 with development RPMs called Mars
We'll do the majority of the work on Mars.
It is assumed that there is an easy way for files to be transferred between running SME servers - i.e. between Earth and Mars in either direction. Exactly how you do this is up to you - I did it by using a Windoze box that could see both SME servers. I simply copied files that needed to be transferred between SME boxes into areas visible by Windoze and then used the power (?) of Windoze to move the files (Yes, you're right, it's called being lazy!).
So, this is how I did it.......
Log into Mars as root.
# mkdir -p /downloads/boxbackup
# cd /downloads/boxbackup
! Get the source forom the following link -
http://prdownloads.sourceforge.net/boxbackup/boxbackup-0.09.tgz?download! Put the source into /downloads/boxbackup
# tar -zxvf boxbackup-0.09.tgz
# cd boxbackup-0.09
! See the documentation on
www.fluffy.co.uk/boxbackup for explanation about openssl
!
! NOTE: The author of BoxBackup STRONGLY discourages the use of any OpenSSL less than 0.9.7. However, as I didn't have time to
! figure out how to install 0.9.7 I've stuck with the 'allow-old-openssl' option. If anyone has time to figure out how to update
! the SME server version, please add to this HowTo.
!
# ./configure allow-old-openssl
# make
! At this point all the software for both backup server and backup client has been built.
# cd parcels
# cd boxbackup-0.09-backup-server-Linux
# ./install-backup-server
! Now we'll make a user for the backup server AND a top level directory to hold
! the backups. The top level directory will ideally be on a separate volume and
! the documentation explains how to do this. However, for the sake of just getting
! the system working for testing purposes, I put the top level backup directory
! on the root volume of the SME box I'm using as the backup server.
# useradd boxbackup
# mkdir -p /earthbackup/backup
# chmod -R 766 /earthbackup
# chown -R boxbackup:boxbackup /earthbackup
! The raidfile.conf is now produced. Using this command the RAID is disabled.
! See the documentation for more details on using RAID.
# /usr/local/bin/raidfile-config /etc/box 2048 /earthbackup
! Now we'll produce the backup server configuration file
# /usr/local/bin/bbstored-config /etc/box mars boxbackup
! We'll now set up some of the keys required to run the system securely. The
! documentation warns against what I'm going to do here on security grounds, but,
! again, this is done in the interest of getting a test system working.
! I guess you could simply copy the following directory structure to a floppy
! and delete it off the hard drive and achieve the same result!
# cd /root
# mkdir boxkeys
# cd boxkeys
# cp /etc/box/bbstored/mars-csr.pem .
# /usr/local/bin/bbstored-certs ca init
# /usr/local/bin/bbstored-certs ca sign-server mars-csr.pem
# cp ca/server/mars-cert.pem /etc/box/bbstored/
# cp ca/roots/clientCA.pem /etc/box/bbstored
! Now choose a positive 31 bit account number out of thin air. For this exercise
! I chose to use 704747.
! Create the account
# /usr/local/bin/bbstoreaccounts create 704747 0 4096M 4505M
! That's all there is to do on the backup server for now.
! Log onto the backup client as root. In this case the client is SME server Earth.
# mkdir -P /downloads/boxbackup
! Copy (from Mars) the file /downloads/boxbackup/boxbackup-0.09/parcels/boxbackup-0.09-backup-client-Linux.tgz
! to (on Earth) /downloads/boxbackup
# cd /downloads/boxbackup
# tar -zxvf boxbackup-0.09-backup-client-Linux.tgz
# cd boxbackup-0.09-backup-client-Linux
! Before going further, you need to establish that Earth can ping Mars. If 'ping mars' works,
! then skip this next bit. Otherwise, establish the IP address of mars and do the following ...
# mkdir -p /etc/e-smith/templates-custom/etc/hosts
# cd /etc/e-smith/templates-custom/etc/hosts
! Make a file called 30backuphostmars containing this one line:
! (Modify the IP address accordingly)
192.168.30.4 mars
! Then ...
# /sbin/e-smith-expand-template /etc/hosts
! Now 'ping mars' again and this time it should work. If not, fix it!
# cd /downloads/boxbackup/boxbackup-0.09-backup-client-Linux
! Now, tthere's a problem with the file called bbackupd-config.
! Edit this file with (say) pico and make the following change to line 231.
! Change ....
if(system("openssl rand -out $enc_key_file 1024") != 0)
! to ...
if(system("openssl rand 1024 > $enc_key_file") != 0)
! When the change is complete, continue ....
# ./install-backup-client
! Configure the client to backup all the user areas and an iBay called 'shared files'.
# /usr/local/bin/bbackupd-config /etc/box lazy 704747 mars \
> /var/backupd /home/e-smith/files/users/ /home/e-smith/files/ibays/shared-files/
! Now make a secure, offsite backup of /etc/box/bbackupd/704747-FileEncKeys.raw
! Without this file you have NO BACKUP!!!!
! Copy (from Earth) /etc/box/bbackupd/704747-csr.pem
! to (on Mars) /etc/boxkeys
! ---- On Mars (the backup server where we started ...) ----
# cd /root/boxkeys
# /usr/local/bin/bbstored-certs ca sign 704747-csr.pem
! Copy (From Mars) /root/boxkeys/ca/clients/704747-cert.pem
! and /root/boxkeys/roots/serverCA.pem
! to (on Earth) /etc/box/bbackupd/704747-cert.pem
! and /etc/box/bbackupd/serverCA.pem
! ---- Meanwhile, back on Earth ... -----
! Edit /etc/box/bbackupd/NotifySysadmin.sh to make sure that error reports
! are e-mailed to the right place. (Or leave it alone for testing!!)
! That's it!. All you need to do now is start the server on Mars and the client on Earth.
! So .....
! ---- On Mars -----
# /usr/local/bin/bbstored
! ---- On Earth -----
# /usr/local/bin/bbackupd
! Now you've got it working, read the documentation at
www.fluffy.co.uk AND SEND THE MAN AN E-MAIL!! He did all the work and it's nice to be appreciated!
Regards,
Dave