Box Backup compile and install

In the following instructions, replace 0.00 with the actual version number of the archive you have downloaded.

You need the latest version of OpenSSL, as some of the extra APIs it provides are required. You should have this anyway, as earlier versions have security flaws. (If you have an earlier version installed, the configuration script will give you instructions on enabling experimental support for older versions.)

See OpenSSL notes for more information on OpenSSL issues.

There are some notes in the archive about compiling on various platforms within the boxbackup-0.00 directory -- read them first. For example, if you are compiling under Linux, look for LINUX.txt as boxbackup-0.00/LINUX.txt after untaring the archive.

Download the archive, then in that directory type

tar xvzf boxbackup-0.00.tgz
cd boxbackup-0.00
./configure
make

The server and client will be built and packaged up for installation on this machine, or ready to be transferred as tar files to another machine for installation.

This builds two parcels of binaries and scripts, 'backup-client' and 'backup-server'. The generated installation scripts assumes you want everything installed in /usr/local/bin

Optionally, type make test to run all the tests.

Local installation

Type make install-backup-client to install the backup client.

Remote installation

In the parcels directory, there are tar files for each parcel. The name reflects the version and platform you have built it for.

Transfer this tar file to the remote server, and unpack it, then run the install script. For example:

tar xvzf boxbackup-0.00-backup-server-OpenBSD.tgz
cd boxbackup-0.00-backup-server-OpenBSD
./install-backup-server

Configure options

You can use arguments to the configure script to adjust the compile and link lines in the generated Makefiles, should this be necessary for your platform.

Arguments of the form compile:-option add the text -option to all compile statements, and arguments of the form link:-option add the text -option to all link statements.

For example, the line

  ./configure compile:-I/usr/local/share/include link:-lspecial

would configure the system to also search the /usr/local/share/include path for include files and link with the special library.

You may include as many arguments as you need, and they are applied in order.

See OpenSSL notes for the OpenSSL specific options.

Tests

There are a number of unit tests provided. To compile and run one type...

./runtest.pl bbackupd release
./runtest.pl common debug
./runtest.pl ALL

The runtest.pl script will compile and run the test. The first argument is the test name, and the second the type of build. Use ALL as a test name to run all the tests.

The output from the tests is slightly muddled using this script. If you're developing, porting or trying out new things, it might be better to use the following scheme:

cd test/bbackupd
make
cd ../../debug/test/bbackupd
./t

or in release mode...

cd test/bbackupd
make -D RELEASE
cd ../../release/test/bbackupd
./t

(use RELEASE=1 with GNU make)

I tend to use two windows, one for compilation, and one for running tests.

 

© Ben Summers, 2003, 2004