WordPress + XAMPP + TrueCrypt + DropBox

If you've been following some of my earlier posts on PKM or PIM you'd be familiar with my attempts to use WordPress or Blogger as a knowledge management tool due to the ease of posting, chronological logging and advanced tagging support for easy information retrieval.

An earlier post discussed why these two blogging systems cannot adequately cater for mixed knowledge privacy levels, i.e. cannot have both public posts and private posts in the same system while retaining all the tagging, categorization and searching benefits. 

This forced me to use Blogger for my Public Knowledge Management aspects (i.e. this site) and use a different solution for my Private Knowledge, namely a self-hosted WordPress instance. I chose to self-host this as opposed to simply creating another freely hosted Blogger or WordPress account with the private global setting set to true for security reasons - my private information should only ever be visible by me (a restrictive model, I know).

Self-hosting my own WordPress was actually quite easy, I just downloaded the Windows XAMPP stack, installed it, changed a few of the default security settings, loaded up my browser to localhost, downloaded the standard WordPress package, went through the simple install procedure and I was up and running within the hour!

The remaining problem was to come up with a zero-maintenance backup strategy to ensure my Private Knowledge Management datastore didn't get corrupted or lost forever due to hardware failure, malware, etc. I also wanted to backup my actual WordPress install containing all my themes, plugins, customizations and uploaded content for easy disaster recovery.

I did this by using a combination of TrueCrypt, Dropbox and MySQL Administrator as follows:
  1. Create a Dropbox user account if you don't already have one and make a Dropbox target folder somewhere on your computer.
  2. Create a TrueCrypt file container, say 256MB to start with, and store this inside your Dropbox target folder.
  3. Mount the TrueCrypt container to say drive T:
  4. Move your XAMPP htdocs web root folder to this new virtual drive (and change the Apache httpd.conf file accordingly).
  5. Schedule a batch script to perform daily backups of the WordPress database and store these in a separate TrueCrypt container that gets mounted and unmounted as required.
So far everything seems to be working as expected. Using Dropbox means my files inside the Dropbox target are automatically replicated to my online account. 

Using a TrueCrypt container means no-one has access to any of the files burried within it. Additionally, TrueCrypt with Dropbox has a nice side-effect in which the encrypted container will only get re-synched when unmounted, hence avoiding constant network synch traffic. 

Once the container does get unmounted, Dropbox is smart enough to perform a binary differential comparison and only re-upload the delta, thus avoiding to upload the entire 256MB file every time.

For anyone that's interested, the batch script I'm using can be downloaded from here (replace variables at top of file as required).

Comments

  1. Sorry, but the upload will not be a differential because the file is being encrypted. When you modify contents of the TrueCrypt you essentially re encrypt all the contents which gives a new random distribution.

    ReplyDelete
  2. Actually I don't believe that's how truecrypt works. I have a 10Gb truecrypt "drive" and there is no way it's re-encrypting the entire 10Gb when I save anything!

    ReplyDelete
  3. I agree with the above. I believe TrueCrypt only re-encrypts the changed file within it's container and updates it's own internal file-system pointers or whatever it does. I can change a file within my 512MB container, unmount it, and it gets synched with DropBox within a few seconds. My upload speed is not very fast.

    ReplyDelete

Post a Comment

Popular posts from this blog

Wkhtmltopdf font and sizing issues

Import Google Contacts to Nokia PC Suite

Can't delete last blank page from Word