
Database Backups
Sets up, checks or restores local memory database snapshots.
Install
npx skills add thedotmack/claude-mem --skill backup-setup -g -a claude-code -y- Repository
- thedotmack/claude-mem109k
- Category
- DevOps
- Updated
- 3d ago
- License
- Apache-2.0
- Context cost
- Lightabout 1,062 tokens
- Runs scripts
- No, instructions only
What it does
Set up, check, or restore local claude-mem database snapshots. Use when the user says "set up backups", "back up my memories", "backup status", or "restore my database".
Backups (local snapshots)
The installed worker snapshots ~/.claude-mem/claude-mem.db on a schedule
(VACUUM INTO, consistent while sessions run) and keeps the newest N under
~/.claude-mem/backups/auto/. Each snapshot is one standalone SQLite file.
Snapshots stay on this machine.
Preserve every unrelated setting and keep ~/.claude-mem/settings.json mode
0600. Never print the file's contents: it holds credentials.
Routing
Based on $ARGUMENTS:
setupor empty: 1. Check status, then 2. Enable snapshotsrestore: 3. Restorestatus: 1. Check status only
1. Check status
npx claude-mem backup status
- Snapshot details printed: backups run. Report the last snapshot time, the snapshot count and any last error; stop unless the user asked for a change or a restore.
- "Automatic backups are not enabled": continue to step 2 if setting up.
- A "Last restore" line reports the outcome of the most recent restore.
- "Worker is not running": start it with
npx claude-mem startand retry. - "Unknown command: backup" or "Backup status failed: HTTP 404": this
claude-mem (CLI or running worker) has no backup support yet, so the
worker would ignore the backup settings.
Stop. Tell the user that backups are not available in their installed
version and that
npx claude-mem updatebrings them once a release includes them. Do not write the settings in step 2, and never say backups are on. - Any other failure ("Backup status failed: HTTP" with another status, "Backup request failed: ...", "Backup status failed: invalid JSON response", "Backup status failed: unexpected response") or any output not listed here: stop. Show the user the exact error line, do not write the settings in step 2, and never say backups are on. Do not suggest an update: this is an error in a version that has backups, not a missing feature.

