Mac desk backup & restore
The product core: pack this Mac, recover on a new one, doctor green — developer ready.
Bar: great, not merely OK
One happy path. Clear progress. Dry-run before writes. Every red doctor line has a next command. Apple Silicon only for the local desk.
What is a desk pack?
An encrypted archive (.desk.enc) of developer service state that does not live in git:
- Global Caddy config and LaunchAgent inventory
- Homebrew PostgreSQL roles / dumps (policy: Postgres only, no Docker DB for apps)
- iTerm profiles, arrangements, scripts
- SSH keys (always encrypted in the pack)
- Tooling inventory (brew list, versions)
- Rebuild playbook +
~/devrepo origins - Docker soft notes (compose paths — not volumes/images)
Consumer Mac state (Photos, Mail, Desktop iCloud) stays with Apple iCloud / Migration Assistant. Optional full-file backup tools (e.g. Arq) remain for bytes; decli rebuilds the desk.
Backup (source Mac)
# Full wipe-style pack (all desk components)
decli desk pack --to icloud
# User-owned cloud (see Destinations)
decli desk pack --to aws
decli desk pack --to gcs
decli desk pack --to gdrive
decli desk pack --to s3:desk-offsite
# Passphrase: DECLI_DESK_PASSPHRASE or prompt — store in 1PasswordDay-to-day Mac→Mac (same Apple ID or Tailscale): decli desk sync push --via icloud / --via tailscale. See Destinations.
Restore (new MacBook Pro)
- Apple Setup / iCloud for the rest of the machine
- 1Password sign-in; install Xcode + Homebrew when prompted by bootstrap
- Install decli:
curl -fsSL https://decli.dev/install | sh(or localdocs.decli.lvh.meinstall path) - Pull the archive (iCloud Drive / destination pull / AirDrop)
decli desk recover --from-archive PATH --dry-rundecli desk recover --from-archive PATH --execute --restart-itermdecli desk doctoruntil green- Workspace sign-in for AI keys: open
https://decli.lvh.meorhttps://decli.dev
Recover phases
Bootstrap runs in order: system → xcode → homebrew → runtimes → locations → auth → desk restore → services → repos → deps → docker (soft) → ai → verify.
Commands cheat sheet
| Command | Purpose |
|---|---|
desk pack | Backup + encrypt + export |
desk recover | Bootstrap + restore one-shot |
desk doctor | Health: Caddy, Postgres, tooling, iTerm, Docker soft |
desk sync push/pull | Mac→Mac via iCloud or Tailscale |
desk destinations … | AWS / GCS / Drive / S3-compatible / local |
desk list / verify | Local snapshots |
Menu bar
The native macOS app (Apple Silicon) can trigger desk backup and iCloud sync, and opens the web console. Bridge default: http://127.0.0.1:43105.
Natural language
decli "backup this mac"
decli "sync to my other mac"
decli "pull desk from icloud"
decli "desk doctor"