diff options
Diffstat (limited to 'configs/claude/rsync-filter')
| -rw-r--r-- | configs/claude/rsync-filter | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/configs/claude/rsync-filter b/configs/claude/rsync-filter new file mode 100644 index 0000000..fff398d --- /dev/null +++ b/configs/claude/rsync-filter @@ -0,0 +1,46 @@ +# The claude layer's state worth a backup, as rsync filter rules (a +# blacklist, so what's new gets backed up, too), for /home/ of a guest +# with configs/claude.nix, e.g., from the host, as root in the guest: +# +# rsync -aHAX --numeric-ids --delete --delete-excluded -e ssh \ +# --filter='merge configs/claude/rsync-filter' root@GUEST:/home/ BACKUP/ +# +# What that keeps: the repositories in ~claude/src (uncommitted files, +# branches only there), the remotes' directories (worktrees, notes), their +# transcripts, memory, links to claude.ai sessions (~claude/.claude/projects), +# files handed to them (~claude/.claude/uploads), trust and settings +# (~claude/.claude.json), and the remotes started with claude-remote +# (/home/.var/lib/claude). uids are fixed, so --numeric-ids holds. +# +# To restore: into a fresh home image, at the same paths (worktrees +# record theirs), then, as root, runuser -l claude -c 'claude auth login', +# as the login isn't in the backup. +# +# Keep this up to date with what the layer and Claude Code put there. + +# Scratch: never backed up. ~claude/src/tmp holds repositories not worth +# a backup (third parties', like nixpkgs), with a symlink in ~claude/src +# each (which gets backed up, as a symlink). +- /claude/tmp/ +- /claude/remotes/*/tmp/ +- /claude/src/tmp/ + +# A secret (the claude.ai login); log in again after a restore. +- /claude/.claude/.credentials.json +- /claude/.cargo/credentials.toml + +# Rebuildable, transient, or synced again from the account. +- /lost+found/ +- /claude/.cache/ +- /claude/.cargo/registry/ +- /claude/.cargo/git/ +- /claude/.claude/backups/ +- /claude/.claude/bridge-spawn/ +- /claude/.claude/cache/ +- /claude/.claude/session-env/ +- /claude/.claude/sessions/ +- /claude/.claude/shell-snapshots/ +- /claude/.claude/plugins/ +- /claude/.claude/skills/synced/ +- /claude/.claude/.last-cleanup +- /claude/.claude/mcp-needs-auth-cache.json |
