summaryrefslogtreecommitdiffstats
path: root/configs/claude/rsync-filter
blob: fb689da648bae91712cd6d8aeb6805da3bbfb2ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# 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/tmp/src 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/
# Remotes retired with claude-remote remove: kept there for a while,
# in case, but not worth a backup.
- /claude/remotes/.removed/

# 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