How I create "encrypted" git backups of my vault

Disclaimer

Is this project open source? N/A
Is this project completely free? Yes
Is this project vibe-coded beyond the author’s ability to comprehend how it works? N/A


I decided to post this because I hadn’t found a great way to backup my vault with versioning outside of connecting it to GitHub or another remote server. I don’t like that, because that data is unencrypted on a third party server with an ever-changing privacy policy.

Today I figured out that I can host a git repo on my own computer, create a “bundle” of that repo, encrypt it with cryptomator or veracrypt, and store that backup in as many cloud storage services as I want.

In my eyes, it solves all my issues:

  • It’s mostly local, and the only data a cloud storage provider sees is fully encrypted. I can make use of even privacy-disregarding cloud storage like Google Drive to store copies of my vault, which makes it very easy to have lots of redundant backups.
  • It’s super easy, and I can even use the GitHub desktop app to commit changes locally, without connecting it to a remote GitHub vault.
  • I can keep the last 1-3 backed up “bundles” while deleting the previous ones, because all of my past versions are stored in the newer bundles. This keeps the storage space to a minimum. (just need to make sure that the bundles and commits aren’t corrupted somehow. Just run “git fsck” in terminal to check)
  • It costs nothing, except for some storage space, and with the size of the average vault you could probably just use the free plan on Google Drive or dropbox to store your encrypted git bundles.

For all I know, people might already be doing this. I just haven’t seen someone spell it out on a forum before. Hope someone can benefit!

This seems like a pretty sane chain: git for history, bundle for the portable snapshot, then encrypt before it leaves the machine. The one thing I’d double-check is that the plain repo never gets picked up by a sync client by accident.