hanneseichblatt.de About Pages Tags Contact RSS

New Repo: Bittorrent Sync on 64 bit Linux

02 June 2013

I use Bittorrent Sync on a lot of my machines to keep several directories in sync. In fact, after being satisfied with Dropbox for a while, I tried nearly everything there is in synchronization. ownCloud was overkill for what I wanted and did not offer decentralized sync. I prefer a solution where devices in the same LAN will sync first, before using the slower connection over the internet. Dropbox could do that. Simple rsync and self-built solutions simply did not scale. Sparkleshare does not really work for my mostly binary files because it keeps a complete history. Git-annex is a beauty, but it does not work automatically and doesn’t really fit the usecase of many rapidly changing small binary files.

BTSync is lacking a webinterface for quick file edits, but it is fast, decentralized and still relatively lightweight.

The new repository mainly consists of a Makefile. After running make, you get three things:

It downloads the newest 64 bit binary to /usr/bin. It then copies a simple init script to /etc/init.d and puts the current user’s name in it. You can put more names in there, if necessary. Upon boot, the script iterates over the list and starts a btsync daemon for each of the users. The individual processes are parameterized with the user’s config file, found in ~/.sync/config.json. The Makefile will generate the default version and change (in the current version) three settings:

All of this is relatively simple and as soon as I get to it, I will build actual Debian packages. Also, it should be easy to make this architecture-independent.