A Backup Script Where a Failed Dump Can't Look Like a Backup: pipefail, Temp Files and Per-Label Retention
CaRMen, my CRM, has a backup script that's 22 lines long. It runs every night from cron and before every deploy, and the deploy script restores from it automatically when a release changes the schema and then fails its health check. A script that a rollback depends on has to be right in the boring details. Three of them are worth spelling out.