From d5f73ce109250b4c4900cbb2d267f89d85d4d128 Mon Sep 17 00:00:00 2001 From: Viktor Barzin Date: Sun, 24 May 2026 18:34:41 +0000 Subject: [PATCH] backup: exclude /anca-elements/ from nfs-mirror + offsite Step 1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Anca's photos are being ingested into Immich (started 2026-05-24 afternoon), so /srv/nfs/immich/library/ becomes the canonical copy for those photos. The separate /srv/nfs/anca-elements/ archive tree + its sda mirror at /mnt/backup/anca-elements/ are now redundant. Going forward: - nfs-mirror EXCLUDES /anca-elements/ so future weekly runs don't re-touch the 771G subtree (also no longer required since Immich has the data via its NFS library). - offsite-sync Step 1 also excludes /anca-elements/ — the historical 771G under /mnt/backup/anca-elements/ stays on sda for now but is NOT shipped to Synology pve-backup/ (Immich's library reaches Synology via Step 2 bypass leg anyway). The 771G on /mnt/backup/anca-elements/ will be cleaned up manually once Immich ingest completes and we verify all photos are in the Immich library. Same for /srv/nfs/anca-elements/ on sdc thin pool — freeing both would reclaim ~1.5 TB across sdc + sda. In-flight context: today's nfs-mirror first run was killed mid-flight at ~70% (was at /srv/nfs/postgresql/). The killed run wrote ~200G of service NFS subtrees to /mnt/backup//, then sda hit 95% used, prompting this change. Next nfs-mirror run will not touch anca-elements and will fit comfortably (~250G total for the keep-list minus anca-elements). --- scripts/nfs-mirror.sh | 8 ++++++++ scripts/offsite-sync-backup.sh | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/scripts/nfs-mirror.sh b/scripts/nfs-mirror.sh index 034f3317..7672d658 100644 --- a/scripts/nfs-mirror.sh +++ b/scripts/nfs-mirror.sh @@ -57,6 +57,14 @@ EXCLUDES=( --exclude='/.lv-pvc-mapping.json' --exclude='/.nfs-changes.log' + # ---- anca-elements: photos are being ingested into Immich (2026-05-24), + # so /srv/nfs/immich/library/ becomes the canonical copy and the separate + # anca-elements tree is redundant. Excluded from nfs-mirror going forward. + # The historical 771G at /mnt/backup/anca-elements/ stays put until manual + # cleanup once Immich ingest completes; offsite-sync Step 1 also excludes + # it from the Synology pve-backup/ upload so we don't ship the redundant copy. + --exclude='/anca-elements/' + # ---- NFS paths: too big / transient / re-fetchable ---- --exclude='/immich/' --exclude='/frigate/' diff --git a/scripts/offsite-sync-backup.sh b/scripts/offsite-sync-backup.sh index 1f3f7cf7..8cc89336 100644 --- a/scripts/offsite-sync-backup.sh +++ b/scripts/offsite-sync-backup.sh @@ -70,12 +70,16 @@ if [ "${DAY_OF_MONTH}" -le 7 ] || [ -n "${FORCE_FULL}" ]; then --exclude='.lv-pvc-mapping.json' \ --exclude='.nfs-changes.log' \ --exclude='.force-full-sync' \ + --exclude='/anca-elements/' \ "${BACKUP_ROOT}/" "${PVE_BACKUP_DEST}/" 2>&1 || STATUS=1 rm -f "${FORCE_FULL_FLAG}" elif [ -s "${MANIFEST}" ]; then MANIFEST_LINES=$(wc -l < "${MANIFEST}") log "Incremental sync (${MANIFEST_LINES} files from manifest)..." + # /anca-elements is being ingested into Immich (Immich becomes canonical) — + # skip the redundant copy in /mnt/backup/anca-elements/ until manual cleanup. rsync -rlt --chmod=Du=rwx,Dgo=rx,Fu=rw,Fog=r --files-from="${MANIFEST}" \ + --exclude='anca-elements/' \ "${BACKUP_ROOT}/" "${PVE_BACKUP_DEST}/" 2>&1 || STATUS=1 else log "No changed files in manifest, nothing to sync"