Backups and version history
Backups and version history
Two independent safety nets, both configured in Settings → Sync & Backup: snapshot backups (whole-vault .zip archives on a schedule) and version history (a Git record of every save, browsable per note). Use snapshots for disaster recovery and history for “what did this note say last Tuesday?”.
Snapshot backups
Back Up Now takes a snapshot immediately; Automatic backups runs one Hourly or Daily (off by default).
Each snapshot is a full, self-contained
.zipnamedLettuce-<vault>-<timestamp>.zip— any single archive restores on its own.Keep last N backups (default 10) prunes older archives automatically.
Location defaults to
~/Library/Application Support/Lettuce/Backups/— deliberately outside the vault, so backups never ride into iCloud sync. You can point it anywhere (an external disk is a good idea), but a folder inside the vault is refused.Housekeeping files agents churn (
.git,.lettuce/proposals, iCloud caches) are excluded from the archive.
Restoring is non-destructive by design: Restore from a Backup… asks for the .zip and then a new, empty folder — it will not overwrite your current vault, ever. Open the restored folder to check it, then copy back what you need. The same engine is scriptable as [[CLI cookbook/14 lettuce backup and restore|lettuce backup / lettuce restore]].
Version history (Git)
Turn on Keep version history (Git) and Lettuce records a commit about 5 seconds after every save, into a repository kept outside the vault (so iCloud can’t corrupt it). Requires Apple’s command-line tools (xcode-select --install) if git isn’t present. No Git knowledge needed — but since it’s a real repo, everything is inspectable if you do know Git.
Per note: right-click a note → Version History… shows every saved version (date + short id) with a unified diff against the note as it is now. Restore writes that old text back as the current content — an ordinary, undoable edit that itself stays in history. History follows renames.
Whole vault: Browse History… in Settings lists every commit and can restore the entire vault as of that moment — into a new empty folder, like a snapshot restore.
Off-machine copy: enter a Push remote (GitHub
owner/repoor any URL) and a token (kept in your Keychain) and Push to Remote mirrors the history to a private repo. Each Mac pushes to its ownbackup-<hostname>branch, so two Macs sharing a vault never clobber each other.
Which do I want?
Both. Snapshots survive a dead disk and restore in one step; history answers fine-grained “undo beyond undo” questions per note. They’re independent — lettuce backup --git records both in the same pass.
Related
CLI cookbook/14 lettuce backup and restore — the same engine from scripts/cron
Core concepts/02 The .lettuce directory — where the config (
backup.yml) lives