This skill should be used when the user asks to "backup Zotero", "create snapshot", "restore library", "rollback changes", "recovery", "backup repository", "undo sync", or when operations may risk data loss. Covers snapshot creation, restore planning, and backup replication.
Zotero-headless provides immutable full-state snapshots with restore capabilities and off-machine backup replication.
Create snapshots before any risky operation:
Automatic snapshot hooks fire after remote pull, before/after remote push, after local import, before/after local apply, and before every restore.
MCP: zotero_recovery_snapshot_create (reason: "before bulk edits")
CLI: zhl recovery snapshot-create --reason "before bulk edits"
A snapshot captures: canonical DB, mirror DB, cached files, qmd export state, and citation export data. Each snapshot includes a manifest with SHA-256 hashes and library inventory.
MCP: zotero_recovery_snapshot_list
CLI: zhl recovery snapshot-list
MCP: zotero_recovery_snapshot_verify (snapshot_id: "...")
Verification checks all file hashes against the manifest to ensure integrity.
Restore is a two-phase process: plan, then execute.
MCP: zotero_recovery_restore_plan (snapshot_id: "...", library_id: "user:123456")
CLI: zhl recovery restore-plan --snapshot <id> --library group:123
The plan shows what will change — review it before executing.
MCP: zotero_recovery_restore_execute (snapshot_id: "...", library_id: "...", confirm: true)
CLI: zhl recovery restore-execute --snapshot <id> --library group:123 --confirm
The confirm flag is required — restore will not execute without it.
MCP: zotero_recovery_restore_list
MCP: zotero_recovery_restore_show (run_id: "...")
Snapshots can be replicated to off-machine backup repositories:
MCP: zotero_recovery_repositories
CLI: zhl recovery repositories
| Type | Description |
|---|---|
local | Built-in, always available |
filesystem | Any mounted filesystem path |
rsync | Remote via rsync over SSH |
s3 | AWS S3 bucket (via AWS CLI) |
Push to backup: zotero_recovery_snapshot_push (snapshot_id, repo)
Pull from backup: zotero_recovery_snapshot_pull (snapshot_id, repo)