.docwriter folder contains comments, pending reviews, sessions, settings, hooks, and temporary agent files.
Choose what to back up
Back up the writing project files when you only need the current text. Git is suitable for these plain files. A text only backup keeps document text only. Comments, pending reviews, saved AI authorship markers, sessions, and interface settings need a separate backup. Browser undo history is temporary and is not included in any backup. Also back up.docwriter/docwriter.db when you need comments, pending reviews, tab state, rules, reviewers, sessions, recent agent activity, and interface settings.
Back up .docwriter/hooks.json when the workspace uses hooks. A hook is a shell command that DocWriter runs after a configured event. Keep project skills and other saved files outside the database with the rest of the project.
Keep API keys out of the repository. Keys saved through DocWriter live in ~/.docwriter/keys.env, outside the workspace, and need a separate secure backup if you cannot restore them from the provider.
Writing references are listed in .docwriter/references.json, with the pasted text under .docwriter/references/. Measurements, calibration state, and the generated author skill live under .docwriter/style-analysis/, .docwriter/style-profile.json, and .docwriter/skills/. Local study events live in .docwriter/style-study/ and do not contain reference text or generated passages.
Decide whether conversation and comment history belongs in the repository before adding .docwriter. The folder can contain document text, comments, file paths, provider conversations, and agent activity.
Create a consistent backup
Stop DocWriter before copyingdocwriter.db so it does not change while the copy is in progress.
Then copy:
- The writing project files.
.docwriter/docwriter.db..docwriter/hooks.json, when it exists.- Project skills and other saved files outside the database.
.docwriter/agent/scratch/ only when you need the agent’s temporary drafts or notes. New session clears that folder. Those files never appear as document tabs.
Restore a backup
Stop DocWriter before restoring files so a running server cannot overwrite your restored copy. Restore the project files and their matching.docwriter folder before starting DocWriter.
Restoring replaces newer files or DocWriter state at the destination. Copy newer work elsewhere first if you may need it.
Restoring only the project files brings back the text. Restore .docwriter/docwriter.db as well when you need comments, pending reviews, or sessions. Restoring only docwriter.db can pair old comments and reviews with different project files. Restore the project files and .docwriter folder from the same backup when possible.
Read How DocWriter saves your work for the difference between project files and saved DocWriter state.