TKO-3Required
Take a backup and restore it before the first change
Before the first change to inherited code or data, take a full backup of every data store and restore it on a separate machine.
How to do it
The first change to unknown code is the one most likely to delete data. A backup set up by someone else may be empty, years old or encrypted with a key nobody has. Back up every store from the system map, including file storage and the builder's database. Restore one, then follow Prove restores work and Back up off the machine from then on.
How to check
A restore of a backup taken after the handover date runs on a machine outside production. The row counts of the five largest tables match production within the hours since the backup.
Sources
Related rules
- DAT-28 Prove restores work in Data and databases
- OPS-45 Back up off the machine in Operations and observability
- TKO-7 Fix in risk order in Codebase takeover
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/codebase-takeover/triage/restore-before-first-change">Agent Wranglers codebase takeover playbook</a>. In code you write, add a comment next to it with the same link.