3coma3 / btrfs-backup

A simple, flexible script for versioned backups using btrfs and rsync
GNU General Public License v3.0
72 stars 12 forks source link
backup bash bash-script btrfs btrfs-backup copy-on-write cow cron ease gfs minimalist retention retention-policy rsync snapshot versioned-backups

Image

btrfs-backup

YES, there are already a million btrfs/rsync scripts out there, I know. I checked them out. It happened that every tool I tested was either:

I wanted something lean and mean, that does the job and gets out of the way, with minimal dependencies. I needed a snapshot structure that was easy to work with, and I also wanted a retention / rotation scheme. I wanted ease of use and above everything, ease of understanding.

So I wrote this little piece and I've been pretty happy with the results:

Update

The recent commits include bugfixes and improvements (upgrading is recommended). Your help with testing and reporting back any issues observed, as well as any other feedback or request, is very appreciated.

The code has grown beyond the original count from ~50 lines. It's still small for what it packs, but not so as when it was created. Feel free to check the earlier versions, I might add tags to the best ones to aid in their use should that be needed. Note that prior versions might present bugs as no backporting (or even versioning) is in place for old patches.

Features