lettuce backup and restore
lettuce backup and lettuce restore
The CLI side of Core concepts/12 Backups and version history — the same snapshot engine the app schedules from Settings → Backups, callable from scripts and cron.
Take a snapshot
lettuce backup ~/Notes # timestamped .zip, default backup folder
lettuce backup ~/Notes --out /Volumes/T7 # somewhere else (an external disk, a synced dir)
lettuce backup ~/Notes --keep 20 # prune to the newest 20 archives afterwards
lettuce backup ~/Notes --git # also commit to the git history mirror
Each run writes one
Lettuce-<vault>-<timestamp>.zip— a full copy, not incremental, so any single archive restores on its own.--keep Napplies retention in the same run; without it nothing is pruned.--gitadditionally records a commit in the vault’s git version-history mirror (if enabled), so the zip and the history stay in step.Exit code is non-zero on failure — safe to
&&-chain in scripts and let cron surface errors.
Inspect what you have
lettuce backup log ~/Notes
Lists the existing snapshots for that vault, newest first, with sizes and dates.
Restore
lettuce restore ~/Backups/Lettuce-Notes-2026-07-15.zip --to ~/Notes-restored
Restore always expands into a new, empty folder — it never overwrites your current vault. Open the restored folder in Lettuce (or copy individual notes back) once you’ve confirmed it has what you need.
Related
Core concepts/12 Backups and version history — the in-app schedule, retention, and git history
CLI cookbook/00 Overview — every subcommand at a glance