# Backup and recovery ## Locate the database The bundled default is `profile:memory-spaces-v4.sqlite`. Installed packages resolve it to the owning DSH profile directory. A linked source checkout cannot infer a profile and must set `DSH_MEMORY_SPACES_DATABASE_PATH` or an explicit config path. Never point two profiles at one file unless shared storage is intentional and separately tested. ## Back up 1. Stop every DSH process using the profile. 2. Record the DSH and plugin versions and database path. 3. Copy the SQLite file and any sibling `-wal` and `-shm` files as one set, or use a SQLite online-backup method while the database is open. 4. Protect the copy as sensitive unencrypted conversation data. 5. Restore a copy in an isolated profile and run `pnpm doctor:fts -- ` plus `PRAGMA integrity_check` before relying on it. Schema 3 migration first creates a consistent sibling file named like `.schema-3-backup-