Backup
Headless Kopia CLI to Drive at 04:00.
KopiaUI does not start at login. A user LaunchAgent runs the CLI at 04:00 and exits. Policy schedules inside KopiaUI only fire while that app is open — do not rely on the GUI for nightly.
Commands
just kopia-nightly --dry-run
just kopia-nightly doctor
just kopia-nightly doctor --policies # two-way 04:00 drift (network)
just kopia-nightly-install --dry-run
just kopia-nightly-install # sync dest runner + bootstrap agent
just check-kopia-nightly # static; no live kopiajust kopia-nightly* always runs the repo source. Launchd runs $HOME/.local/bin/kopia-nightly. Chezmoi apply and just kopia-nightly-install both write that dest runner; install copies with /bin/cp -f when KOPIA_NIGHTLY_REPO is set. Dest plist still comes from Chezmoi: $HOME/Library/LaunchAgents/com.wyattowalsh.kopia-nightly.plist. After runner edits, re-run just kopia-nightly-install so dest picks up the new script.
Sources (04:00)
$HOME/.bash_profile $HOME/.bashrc $HOME/.codex/memories $HOME/.gitconfig $HOME/.github $HOME/.gitignore $HOME/.zshrc $HOME/Documents $HOME/Movies $HOME/Music $HOME/Pictures $HOME/Public $HOME/dev $HOME/src
Not snapshotted: $HOME itself. Never kopia snapshot create --all.
Login / background
install and each nightly run disable com.kopia.kopiaui.login and KopiaUI. Opening KopiaUI by hand can put a login agent back; the next run removes it.
The nightly label is com.wyattowalsh.kopia-nightly. If it is not loaded after install, allow it under System Settings → General → Login Items & Extensions → Allow in the Background, then re-run just kopia-nightly-install.
Sleep
If the Mac is asleep at 04:00, launchd runs the job at the next user-session wake. No wake schedule. While a snapshot is running, the job holds idle sleep with caffeinate -i.
The runner caps snapshot wall-clock time at 43200s (override KOPIA_NIGHTLY_TIMEOUT_SEC) with timeout or gtimeout. The plist deliberately has no TimeOut key; launchd does not implement that wall-clock limit. The EXIT trap still disables the KopiaUI login agents.
Secrets
Repo password, rclone config, and Drive folder ids stay local. Docs and tracked files use $HOME / Chezmoi templates only. Never track rclone.conf.
$HOME/.github is in the 04:00 source list and may contain credentials that then exist in the backup remote. That is not a git leak — this repo does not track those files.
rclone remains the Kopia Google Drive backend. s5cmd is a separate high-throughput S3/local CLI. Do not retarget Kopia to s5cmd, and do not track AWS keys or add an aws alias.
See Security.