Export and restore safely
Create a validated snapshot, make one reversible change, stop every database user, restore, and prove the previous state came back — including what a snapshot deliberately does not carry.Outcome and prerequisites
You will take a consistent snapshot of the whole store, make a change you can see, restore over it, and prove the change is gone. Then you will understand exactly what a snapshot contains, what it deliberately leaves out, and how that affects moving to another machine.
- The
synapseCLI installed. - A destination path that does not already exist.
- A terminal you can keep open, to record one memory ID.
-
Check the store before you trust a copy of it
synapse path synapse data checkDatabase: /Users/example/Library/Application Support/synapse/brain.db Version: 7 Integrity: okIntegrity must read
ok. Two separate checks stand behind that word: a relationship check that runs every time the database opens, and a full page-by-page scan that reads the whole file. Exporting a store that fails either one copies the problem rather than saving you from it.If it reports anything else, stop here and follow the corruption guidance in Troubleshooting before continuing.
-
Create a fresh export
backup="$HOME/Desktop/synapsetutorialbackup.db" test ! -e "$backup" synapse data export "$backup"Exported /Users/example/Desktop/synapsetutorialbackup.dbThat one line hides four steps. Synapse writes a consistent compact snapshot rather than copying a file that may be mid-write, secures its permissions to owner-only, reopens it read-only, and validates it — all before reporting success. An export that would not open is a failure here rather than a surprise months later.
The snapshot is a complete SQLite database. It holds every memory with its scope and project, vault and secret metadata, scope trust records, import batches, skill install receipts, mesh history, and your settings.
-
Add one marker after the export
printf '%s\n' 'This entry exists only after the tutorial export.' \ | synapse memory add synapserecovery synapse memory list synapserecoveryStored memory #42Record that ID. It is the marker that must disappear when the restore succeeds — which is what turns this from "the command did not error" into an actual proof.
-
Stop every database user
Quit the Synapse desktop app. Close every connected session so its
synapse mcpchild process exits. A plain CLI command releases its lock when it finishes, so nothing needs doing about those.Reading the database takes a shared lock; restoring requires an exclusive one. If you deliberately leave a session open, the next step will refuse and tell you to close the app and connected tools.
-
Restore
synapse data restore "$backup"Restored /Users/example/Desktop/synapsetutorialbackup.db Previous database: /Users/example/Library/Application Support/synapse/backups/brain.1785776950101.restore.dbRead the second line. Before replacing anything, Synapse wrote the current database into the backups folder with a
restoremarker in its name. If you have just restored the wrong file, that path is your way back — and it is printed rather than left for you to discover.The sequence is: validate the source, validate the current database, acquire the exclusive lock, snapshot the current state, then replace atomically. Any step failing leaves the original in place.
-
Verify the earlier state actually returned
synapse data check synapse memory list synapserecoveryIntegrity should read
ok, and the marker must be absent — an empty result is the success condition. Confirm something you expect to still be there as well, so you are testing that the right state returned rather than that the database is merely empty:synapse memory listReopen the desktop app and your connected tools only after this verification passes.
What a snapshot does not carry
This is the part that surprises people, and it follows directly from the security model.
| Not in the export | Why, and what to do |
|---|---|
| Secret values | They live in their own store and were never in brain.db. On the same machine, restored metadata still points at them and everything works. On another machine, recreate each with synapse secret set — or, on the encrypted store, carry vault.db and vault.key across together, since neither is any use without the other. |
Your SOUL.md | A file beside the database, not a table inside it. Copy it separately if it matters — and it usually does. |
| Your skill library | Directories under the data folder. Copy skills/ separately. |
| Roles and teams | TOML under the data folder, plus anything in a project's own .synapse/roles/, which travels with that checkout instead. |
| Tool configuration | Belongs to the tools themselves. Reconnect on the new machine rather than copying their files. |
# a complete manual copy, when the database alone is not enough
cp -R ~/Library/Application\ Support/synapse ~/Desktop/synapse-full-copy
Backups you did not ask for
Synapse writes snapshots on its own at two moments: before any schema migration, and before any restore. Both land in the same place:
ls ~/Library/Application\ Support/synapse/backups/
Only the newest few are kept, so the folder cannot grow without limit — the same rule that bounds worker logs and the crash log. That means an automatic backup is a safety net for the operation that just happened, not an archive. If you want a copy to keep, take an explicit export and move it somewhere Synapse does not manage.
Moving to a new Mac
On the old machine
Run
synapse data export, and copySOUL.mdand theskills/directory alongside it. Note which secrets exist withsynapse secret listfor each vault — the names, since you cannot export the values.On the new machine
Install Synapse, install the CLI, then restore the export before connecting any tools. Put
SOUL.mdandskills/back in the data folder.Then
Recreate each secret with
synapse secret set, re-approve each project scope withsynapse allow— approval is per machine, because it is a statement about a file you have read — connect your tools, and runsynapse skill install.
synapse doctor
One command to confirm the new machine matches the old one: same schema version, same memory count, tools connected, skills installed.
Next step
Finish the maintainer level with Check, migrate, and remove Synapse, which covers the health report in full and both removal paths.