Justin Taft

Home / Github / LinkedIn / Consulting Services

Creating and backing up security sensitive VMs using KVM and Borg

Nov 17, 2019

It's Thursday night. You've been hacking away at a web app all week. All of a sudden your laptop turns off because you forgot to plug in the power cord. No bigge you think. You plug your laptop in, boot it up, and start the VM you've been using. Crap, you sigh to yourself, as you realize your proxy project file is corrupted. You start hunting for the bugs you've already discovered, muttering to yourself you should have had a backup plan in place.

Sound familiar? Hopefully not! But if so, let's see how we can mitigate this from occurring.

At its core, we need a way to backup VMs which have an encrypted data store. VM Backups should occur behind the scenes, and downtime should be minimum (under a second at most). Additionally, we are aiming for crash consistency. There are a few ways to achieve this, but this is one of the less complex methods in my opinion:

Blog Posts: