Pular para o conteúdo
#0042
CronSnapshots

Keep the last 24 hours as 24 snapshots

A managed cron entry fires @hourly. It curls the snapshots URL with a name like auto-h$(date +%H). The names cycle: auto-h00 through auto-h23. After 24 hours, each new snapshot overwrites the one from yesterday at the same hour.

You always have the last 24 hours of state, retained at hourly granularity, costing roughly nothing because idle snapshots don't burn CPU or RAM. When something goes wrong at 2:14pm, you restore auto-h13 and you're back at 1pm: a minute before the issue started.

This used to require backup software, retention rules, S3 buckets, lifecycle policies, an annual audit of the runbook. It's now one cron line and a naming convention.

Your time machine has 24 floors and the elevator is a curl.