Crash recovery

Two safety nets run while you work: rotating backups on disk, and a log of every edit since the last save.

Autosave

A backup copy is written every 2 minutes, alongside the .dna project file and named after it:

project.dna              the last manual save, never touched by autosave
project.dna.autosave.1   newest
project.dna.autosave.2
project.dna.autosave.3   oldest kept

Each tick shifts the numbers down and writes a fresh .autosave.1. Three are kept. A tab with no unsaved changes is skipped, so the backups only ever hold work you have not saved.

Autosave is on by default and there is no autosave section in Preferences, so the interval and the number of backups kept are the shipped values.

A backup always holds the whole project from the root down, even when the tick lands while you are dived into a subgraph or have one open in its own window. Edits made in a floating subgraph editor are folded in before the file is written, so nothing that happened in that window is left out.

A project that has never been saved is not autosaved. Rotation needs a file on disk to sit beside, so untitled work is skipped entirely. Save once, early.

The edit log

Alongside the backups, every edit that changes the project is appended to project.dna.log as it happens. The log is what a recovery actually replays, and it is finer-grained than the 2-minute backups: at most 16 commands are lost to a crash, not two minutes of work.

The recovery prompt

A clean-shutdown marker is written when the app quits normally. If that marker is missing at the next launch and a project path was recorded, a prompt appears:

"Unsaved changes detected. Restore?"

The prompt also names the newest autosave file when one is newer than the manual save. When there is none it says so, and the prompt still appears.

Closing the prompt with its close button counts as No, discard. There is no neutral way out of it.

Neither choice deletes a .autosave.N file, and neither does a normal quit. The backups stay in the project's folder and can be opened by hand whichever button you press.

See also