Monday, January 14, 2008


For a long while I have pondered and tried to find an elegant way to backup my co-located server. I tried and failed with Amanda and several home-brew scripts. I finally stumbled across boxbackup.
Boxbackup is a multi platform network backup device. One system acts a a server to which clients (windows mac linux bsd) can connect to and backup files.
Boxbackup uses libsync (think rsync) to only synchronise files that have changed. Also because there is both a server and client agent its should be more efficient than rsync alone.
Security is assured through the use of Tsig certificates. Certificates are used to encrypt the data transmission and secure files as they are transferred.

Server Setup

There are Debian packages available here Download
then install
dpkg -i boxbackup-server_0.10-1~bpo.1_i386.deb
The debian installer didnt work out very well for me so I manually ran. Replace server1.example.tld with the name of your server.
bbstored-config /etc/boxbackup server1.example.tld bbstored
Change directory
cd /etc/boxbackup/bbstored
Create a certificate authority
bbstored-certs ca init
Sign the server key
bbstored-certs ca sign-server server1.example.tld-csr.pem
copy the certificates into the bbstored directory
cp ca/servers/server1.example.tld-cert.pem .
copy the server cert
ca/roots/clientCA.pem .
My server is behind a NAT firewall so I had to open port 2100 and edit /etc/boxbackup/bbstored.conf from
ListenAddresses = inet:server1.example.tld
ListenAddresses = inet:
Create a client account, each client is identified with a unique hex code 75AB59D
bbstoreaccounts create 75AB59D 0 20480M 20480M
The numbers with M following are the soft and hard limits for the amount of space on the server to allow for backups.
Start the server
/etc/init.d/boxbackup-server start

Client Setup

Log into the client computer, download boxbackup-client

and install
dpkg -i boxbackup-client_0.10-1~bpo.1_i386.deb
You will be prompted to let Debian guide you, it didn't work for me. Change to the boxconfig directory
cd /etc/boxbackup/bbackupd
and run the config generator
bbackupd-config /etc/boxbackup/ lazy 75AB59D server1.example.tld /var/bbackupd /home /var/www

The final entries are the directories to backup.
Copy 75AB59D-csr.pem to the main server /etc/boxbackup/bbstored/ and sign with your server certificate.
bbstored-certs ca sign 75AB59D-csr.pem
This will create 2 files ca/roots/serverCA.pem and ca/ clients/75AB59D-cert.pem. Copy these to the client in /etc/boxbackup/bbackupd/
Start the client
/etc/init.d/boxbackup-client start
Check its running
grep bb /var/log/syslog
You should see something like

Jan 14 22:53:54 client bbackupd[3540]: Starting daemon (config: /etc/boxbackup/bbackupd.conf) (version 0.10)
Jan 14 22:53:55 client bbackupd[3540]: Beginning scan of local files
Jan 14 22:53:55 beta bbackupd[3540]: Opening connection to server server1.example.tld...
Jan 14 22:53:56 beta bbackupd[3540]: Connection made, login successful

Good Luck!

Planet Telex

I woke up coughing this morning felt really awful, the boozing last night only served to further dent my immune system.
I eventually managed to drink enough fluids to rehydrate myself and get back on track.
Endo had invited me around to his place. He and Jo have been living there for a while but he has been busy redecorating. Apparently I missed the worse of the chaos. Having left Wilmslow they now live near Warrington, so it was just a 30 minute blast down the M56 (and some weird little roads thank goodness for GPS) and I arrived in the Cul-de-sac they now call home. I must admit I was impressed with his handy work its going to look ace when its done. The 46 inch plasma fitted to the wall and all the associated gear tucked away under the stairs. He did have a bit of an issue though we hung the tv turned it on and attempted to change the channel then realised the magic eye was hidden behind the panel he just cemented into place. He had to act as a human remote control.
We chatted and played some Unreal 3, Jo made dinner a really tasty prawn curry. She asked if I liked hot food and I replied yes. Little did I realise this meant I would be eating whole raw chillies it was a bit of a surprise nearly taking my head off. Still very tasty meal.
I left after nine and was going to have an early night, but I got a message from Ian he and Nick were in the Thieves neck so I joined them for last orders. Nick looked dreadful apparently has been struck down with the vomiting bug and only just recovered. I thought he was supposed to be in Thailand with Brie, but from the sounds of it things had taken a turn for the worst. Both he and Ian were celebrating being single. Apparently Ian briefly refreshed his carnal relations with one of his ex's he decided not to continue, a wise move I feel. From my own experiences it never really worked out going over the same ground again, its better to lok forward rather than back, YMMV.