Getting data off a USB disk, and into the backup store.

If you're using boxbackup to backup through the internet, chances are you'll have some machines that have large amounts of data to be backed up, but sending it through the internet will take some time, and, depending where you live, could also be expensive. Wouldn't it be nice if you could copy all that data onto a USB disk and sync locally for the initial backup? The good news is that you can!

I'm going to assume that you've already set up a boxbackup server, and that it's all working. If not, I recommend this excellent tutorial by xkr47. You can find it here I'm also going to be using xkr47's steps. He does not use the default layout, so please substitute my paths for your correct paths.

CONF_SRV is where your server config is CONF_CLI is where the client config is CA_BASE is the base directory of the Certificate Authority

Install the Client on the Server machine. Step one is to install make sure that the backup client is on the server too. I have been using the 0.11RC2 tarball, but your distribution may provide a different version. Whatever the case, make sure you use the same version as your server! You will need the development tools for your distro to compile from source.

Using Ubuntu:

sudo apt-get install build-essential

Using ClarkConnect:

apt-get install cc-devel

Fetch and build the code


tar xvzf boxbackup-0.11rc2.tgz 
cd boxbackup-0.11rc2
make backup-client-install

Configure the Server to backup from the local directory You need to create the backup account on the machine first. If you have already made an account on the client machine, just copy the configs and certificates to the server. Make sure you set the permissions appropriately! Also, think about the soft and hard limits. Don't set them too low.

bbstoreaccounts -c ${CONF_SRV}/bbstored.conf create 123456 0 10G 15G

Mount your USB drive somewhere. I'm assuming you've just used rsync or some such tool to copy directly onto the disk. Your disk should look like this:

[email protected]:/mnt/# ls client123456/
/home /etc /var

Once you've mounted the disk, we can generate the client config. I'm assuming disk is mounted on /mnt

mkdir -p ${CONF_CLI} ${DATA_CLI}
chmod og= ${CONF_CLI} ${DATA_CLI}
bbackupd-config ${CONF_CLI} snapshot 123456 ${HOSTNAME_SRV} ${DATA_CLI} /mnt/client123456/home/ /mnt/client123456/var

This will backup /home and /var from the USB disk. Then sign your certificates as usual.

cp ${CONF_CLI}/bbackupd/123456-csr.pem ${CA_BASE} 
cd ${CA_BASE}
bbstored-certs ca sign 123456-csr.pem
rm 123456-csr.pem
cp ${CA_BASE}/ca/clients/123456-cert.pem ${CONF_CLI}/bbackupd
cp ${CA_BASE}/ca/roots/serverCA.pem ${CONF_CLI}/bbackupd

Run the backup Now you can run bbackupd. Please make a backup of your 123456-FileEncKeys?.raw. You need this to restore files! I tar all mine up and keep a copy on several systems. I'm not sure what other people do, but it's crucial to keep these in a safe place. Once the backup has run, you need to stop bbackupd on the server, umount the USB hdd, and configure the client.

Configure the remote client Tar up all the configs, then scp them to the remote machine. Create the relevant directories on the server, then untar the config. Then edit the config with your favourite editor:




                Path = /home/



So you remove all the /mnt/client123456. Then the machine will backup as normal! Just remember to use cron to run bbackupctl if you're using snapshot mode, and you're done.

Last modified 9 years ago Last modified on Feb 21, 2008, 5:42:12 AM