Data & backup
This page is generated from docs/guide.en.md · Edit this page on GitLab
All the state lives in data/ (gitignored): reviewer.db (SQLite), clones/, reviews/ (one folder per MR, with one report version per pass: review-v1.md, review-v2.md…), tickets/, tasks/ (diffs per project and exploration answers).
Backing up
Settings → General → “Back up the data” produces a dated .zip archive containing:
reviewer.db, copied through SQLite's backup API and not with acp— a file copy made during a write gives a corrupted database, which you only discover the day you try to restore it;reviews/,tasks/andtickets/: the reports, agent outputs and screenshots the database references by path. Backing up the database alone would leave dead references;- a
LISEZ-MOI.txtwith the steps to restore — a backup you no longer know how to restore is worth nothing, and it is six months later that you open it.
The clones and worktrees are excluded: they come back with a git clone, and including them would multiply the archive's size without saving anything irreplaceable. The archive is assembled in memory; past 256 MB it is refused, naming the file that tipped it over, rather than bringing the server down.
Restoring — with Mergerie stopped (the database must not be written during the copy): put the old data/ aside, unzip the archive in its place, restart. The missing clones are rebuilt on demand.
Keeping the history
Settings → General → “Keep the history” (default 90 days, 0 = no limit) deletes, past the delay: the job logs, the finished jobs and the activity feed. The cleanup happens at startup then once a day. Minimum 7 days — a shorter delay would erase the log of the job you are reading; and a job in progress is never purged, however old it is.
Two things are never purged, deliberately: the token cost (usage), because it carries a cumulative total that must not go down by itself, and the agent iterations (agent_pass), which already disappear with their session and which the cards offer to re-read.
Closed merge requests slim down. “Slim down closed merge requests after” (default 180 days, 0 = never, minimum 30): a merge request merged, closed or filed as “done” for longer keeps its last report — what you re-read to understand what went to production — and loses the previous versions, the stored diff, the questions asked on the report and its working folder. The MR's row stays: the brief and the statistics still count what was handled. Inactive clones get compacted: a repository nobody has fetched for thirty days gets a git gc, at most once a month. Clone without blobs (Settings → Git, this workstation) applies --filter=blob:none to the next clones: the whole history, file contents on demand — off by default, because an agent that reads many files pays a round trip for each content. And the gauge: Settings → General → “Measure disk usage” says what the database, the clones, the reports, the sessions, the verification worktrees, the tickets, the notes, the data repository and the temporary folder weigh; “Clean up now” runs the daily pass right away — behind a confirmation, since what it deletes (old job logs, slimmed merge requests, compacted clones) does not come back — and says what left.
To run tests without touching your database: MERGERIE_DATA_DIR=/tmp/my-test npm start.