Exploring btrfs for backups Part 4: Weekly Culls and Unit Testing

Back in August I finally had some time to do some things I’d been wanting to do with my Snap-in-Time btrfs program for a while now. First of all, I finally added the weekly code. So now my snapshots are cleaned up every three days and then every other week. Next on the docket is quarterly cleanups followed up yearly cleanups. Second, the big thing I’d wanted to do for a while now: come up with unit tests! Much more robust than my debug code and testing scripts, it helped me find corner cases. If you look at my git logs you can see that it helped me little-by-little figure out just what I needed to do as well as when my “fixes” broke other things. Yay! My first personal project with regression testing!

A small note: to accommodate the unit testing, I had to change the file name – so the one you want to use is the one without dashes. I am not 100% sure how to get rid of the old file without losing commit history, but I think it’s not too big of a deal for now.

If I can get my way, the next update will be when I setup the self-healing RAID 1 followed by setting up the backup harddive and btrfs send/receive.

Author: Eric Mesa

To find out a little more about me, see About Me