Better Safe: a CLI wrapper for on-demand Snapper snapshots
A simple CLI tool that makes creating BTRFS snapshots with Snapper quick and painless from the terminal.
If you run BTRFS on Linux — and if you're reading this blog, there's a decent chance you do or you're thinking about it — you probably know that filesystem snapshots are one of BTRFS's killer features. Snapper manages them beautifully with automated timelines and cleanup policies. But there's a gap in the workflow that bugged me: creating an on-demand snapshot with a meaningful description, the kind you want to take right before doing something risky, requires a command that's just verbose enough to be annoying. You end up typing something like sudo snapper create --description "before kernel update" --cleanup-algorithm number --print-number, and while that's not exactly rocket science, it's enough friction that you start skipping it when you're in a hurry. Which is, of course, exactly when you most need a snapshot.
Making the safety net frictionless
Better Safe wraps that entire process into a single command with two modes. Interactive mode: type bettersafe and you'll be prompted for a description. Quick mode: bettersafe -d "Before kernel update" and you're done in under a second. The tool handles sudo elevation automatically, creates the snapshot, and shows you the details including the snapshot number for easy reference. One nice touch I'm particularly pleased with: after creating a snapshot, it also shows you the previous snapshot and calculates how long ago it was taken. So you get a quick sense of your snapshot cadence without running additional commands — a gentle nudge if it's been three weeks since your last manual snapshot.
The philosophy of reducing friction
The name says it all: better safe than sorry. I've developed a habit of snapping before any system change — kernel updates, config file edits, installing new packages, changing display settings, anything that could conceivably leave my system in a broken state. On a BTRFS system with Snapper, rolling back from a bad change takes about thirty seconds. But only if you actually took the snapshot. The whole project is built on a single insight about human behaviour: safety practices that require even a small amount of friction get skipped under pressure, and the times you skip them are precisely the times you'll wish you hadn't. Better Safe removes just enough friction to make snapshotting genuinely second nature. Installation is trivial — copy the script to /usr/local/bin and you're done — and it works on any Linux distro that supports BTRFS and has Snapper installed. I later built a GUI counterpart called Snap-It for when I'm not in a terminal, but Better Safe remains my go-to for terminal workflows.
Grab it from GitHub: Better Safe.
CLI for taking on-demand Snapper snapshots (BTRFS)