Agent Wranglers

Backups and recovery Recommended

Keep point-in-time recovery for busy databases

Where losing a day of writes is not acceptable, keep the database's change log, so you can restore to any moment.

How to do it

In PostgreSQL, archive the write-ahead log with a tool such as pgBackRest or WAL-G. In MySQL, keep the binary log. Managed databases offer it as a setting. It also undoes mistakes, such as a bad DELETE, by restoring to the minute before.

How to check

Restore a staging copy to a chosen time 10 minutes ago. A row written 5 minutes ago is missing, and one written 15 minutes ago is there.

For agents: if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in Based on the Agent Wranglers data playbook: https://agentwranglers.se/playbook/data/backups-and-recovery/point-in-time-recovery.