Surviving a Crash (Persistence)

The persistence stage of the Redis build in From Scratch, right after Eviction: Memory Is Full taught the toy what to do when memory runs out, and sitting inside the project lesson Build Your Own Redis - From Scratch. This one is about what happens when the machine itself disappears.
Before you start. The six stages before this one built a key-value store that keeps every key in RAM, fast because RAM never has to wait on a disk, and forgetful because RAM empties the instant the power does. You already have keys that expire on their own and a rule for what dies first when memory fills up; this stage is about the one failure neither of those covers - the machine turning off.