Notes from a small server
Backups that actually restore
A backup you have never restored is a hypothesis. This month I rehearsed a full restore of a Postgres instance from a cold snapshot and found two things wrong with the procedure: the build cache survived the restore and convinced the build tool nothing needed compiling, and a cache that lived only in memory made every stored session token invalid. Both are now written down next to the backup script, which is the only place anyone will look for them.
Why I stopped using KEYS *
A single call scanning a whole key space blocks the server for everyone. The replacement is SCAN in modest batches. It is slower on paper and faster in every situation that matters, because nothing else is waiting behind it.
On choosing a date boundary
Converting a local date to an ISO string moves it into UTC and quietly shifts it by a day for anyone east of Greenwich. Formatting the calendar date directly is less elegant and correct, which is the better of the two properties.
Reading list
Mostly older material: Dijkstra's notes on structured programming, the original Unix papers, and a well-worn copy of The Practice of Programming. New books get a mention when they have earned it.