Skip to content

Archive for July, 2013


BitBak – Offsite Encrypted Dropbox Backup

What is the aim of this?

BitBak is an automated offsite encrypted Dropbox backup which utilizes TrueCrypt volumes to keep your data secured while storing it on the cloud. The goal is to protect your work from prying eyes and data loss at the same time by automatically encrypting then backing up your files to existing free cloud services. Sold already? Go to download!

Why take offsite backups in the first place?

If you’re a student like me, you don’t have a great deal of money to throw around. You probably develop your small or individual work either using a local repo, a cheap repo, or no repo at all. A local repo means that all your files are at the mercy of your (or your local server’s) hard drive. Same with no repo at all. A remote, free/cheap repo may one day disappear off the face of the earth, or you may consider the fact that they are cheap is a means for them to steal people’s projects illegally (in which case you should opt for a local repo if you’re the only one working on it). So essentially the risks amount to hard drive damage or theft, or remote service termination (along with all your files if you’re unlucky).

How does it work?

Very simply, it mounts a TrueCrypt volume, looks through all the folders you specify to backup, zips them up, copies them to the mounted volume, and unmounts again. In between this process, excess old backups are removed as per your specification. You can specify the interval at which to run, or you can silently run the program from the Windows Task Manager (just supply the argument “runsilent”) to allow total flexibility of when to run.

At this point, I should make it clear why I use Dropbox this. Dropbox only syncs changed blocks, rather than the entire volume, so adding small files to your volume won’t cost you a few hours of uploading. I should also point out that dynamic sized volumes will prevent a huge upload when you first create it. Of course, both of these choices are entirely up to you.


  • Automated interval-timed or manual backups to an encrypted TrueCrypt volume on Dropbox
  • Multi-directory backups
  • Encrypted key storage for TrueCrypt volume key (so that the volume can be securely mounted and unmounted automatically)
  • Old backup archives automatically deleted as per your settings
  • Can be run silently via Windows Task Scheduler or batch script by adding argument “runsilent”


  1. Create a new TrueCrypt volume. Follow the steps in TrueCrypt to create an encrypted file container (‘standard TrueCrypt volume’) inside your Dropbox folder (or anywhere, but Dropbox works best as syncing doesn’t require the entire volume to be uploaded)
  2.   Open Options->Settings to let BitBak know where your TrueCrypt volume resides, what its password is, to add directories to the backup process, and to configure a few preferences.
  3. Run a backup from the main screen. That’s all! You should be able to see all the backups in your TrueCrypt volume when you next mount it through TrueCrypt.

I’m sold, let’s try it

TrueCrypt and Dropbox are individually associated with thier own license agreements to which you must agree before utilising and installing those services. You must also agree to the license provided in ‘BitBak license.txt’ before using the program.



  • Fixed “runsilent” bug (thanks John N. for pointing this out)
  • Fixed bug where backups would ignore specified path within archive and appear in the root backup directory
Version: 0.1.1
5.2 MiB

Source code: 

BitBakSrc (5.2 MiB)

Older versions:

v0.1 – Initial release

BitBak (5.2 MiB)

Source code: 

BitBakSrc (29.5 KiB)

If you get a malware warning, that’s because I’ve requested administrator privileges. If you don’t trust me, read through the source code – it’s only a few hundred lines!

Fork me on GitHub