Yet Another BTRFS Time Machine Clone

Never again worry about losing your digital files. Time Machine automatically saves up-to-date copies of everything on your Mac — photos, music, videos, documents, applications, and settings. If you ever have the need, you can easily go back in time to recover anything.

That’s the marketing blub on Apple’s website for Time Machine. Of course, thousands of nerds came up with ways of accomplishing the same thing under Linux and among them probably hundreds using BTRFS‘ awesome snapshots. Since I couldn’t find a script I could easily drop on my machine I wrote my own … hence the title. It is written in Python (what else?) and only provides the bare minimum of functionality. It’s available on bitbucket. Now I have hourly backups which only store the diff and if more than one snapshots have the same diff it is also stored only once. What I haven’t done yet but probably should do is to protect my .snapshots directory from rm -rf  ROOT_DIR by chmod 000.