CHAT_OUTPUT_BEGIN
COMMAND_ID=BACKUP-CAPACITY-RETENTION-MAP-228
STATUS=OK
RC=0
HOST=pve01
MODE=read-only
COMPONENT=cluster-audit
REFERENCE_REGISTER_CHECK=OK
REFERENCE_SHA256=5763f2f8edc75fcf6f3951f8c95896d1cc112ceccb6cf5b64a383f540a4deb8e
ERROR_REGISTER_CHECK=OK
ERROR_REGISTER_SHA256=08b3a769b8e38eaa1acec915352fb328180d70caa7ff6cd9d1ec0da426262752
COMMAND_SHA256=b5a05a18df011bdc06f8f5c2c36cd637a4a53375d2c3110197989e01989b0a08
DUPLICATE_FAILED_COMMAND_BLOCKED=false
EXECUTION_STARTED=true
CHANGES_MADE=false
SANITIZED=yes
SECRETS_INCLUDED=no
PRIVATE_ADDRESSES_INCLUDED=no
RAW_EVIDENCE_SHA256=3f2c4bf3f338a8422315f4ebec54c66708c0f6723af7c45df03ec30039a1cac4
SANITIZED_OUTPUT_SHA256=3f2c4bf3f338a8422315f4ebec54c66708c0f6723af7c45df03ec30039a1cac4
OUTPUT_BEGIN
PREVIOUS_COMMAND_ID=GITEA-RESULT-RESOLVER-SOURCE-225
=== SCRIPT_RETENTION_LOGIC ===
8:PARENT=/mnt/staging/vzdump
9:PREFIX=vm160-pve02-
26:DIR="$PARENT/${PREFIX}${TS}"
35:    ssh "${SSH[@]}" "$TARGET" "rm -rf -- '$DIR'" >/dev/null 2>&1 || true
39:    mv "$tmp" "$HEALTH"
41:  rm -f "$LOG"
45:REMOTE_FREE="$(ssh "${SSH[@]}" "$TARGET" "df -B1 --output=avail '$PARENT' | awk 'NR==2{print \$1}'")"
46:LATEST_SIZE="$(ssh "${SSH[@]}" "$TARGET" "find '$PARENT' -mindepth 2 -maxdepth 2 -type f -path '$PARENT/${PREFIX}*/vzdump-qemu-${VMID}-*.vma.zst' -printf '%s\n' | sort -nr | head -n1")"
47:LATEST_SIZE="${LATEST_SIZE:-0}"
48:if test "$LATEST_SIZE" -gt 0; then
49:  REQUIRED="$((LATEST_SIZE + LATEST_SIZE / 4 + 10737418240))"
56:target_worker finalize "$PARENT" "$PREFIX" "$PART" "$FINAL" "$DIR" "$NAME"
60:target_worker promote "$PARENT" "$PREFIX" "$DIR" "$TS"
62:printf 'STATUS=OK\nSERVICE=homelab-vm160-remote-backup\nTIMESTAMP_UTC=%s\nVMID=%s\nSOURCE_NODE=pve02\nTARGET_NODE=pve03\nTARGET_DIR=%s\nARCHIVE=%s\nSIZE_BYTES=%s\nSHA256=%s\nREMOTE_RETENTION_GENERATIONS=1\n' "$TS" "$VMID" "$DIR" "$FINAL" "$SIZE" "$SHA" > "$tmp"
64:mv "$tmp" "$HEALTH"
66:rm -f "$LOG"
=== REMOTE_CAPACITY_AND_ARTIFACTS ===
Filesystem                          1B-blocks         Used   Available Use% Mounted on
/dev/mapper/pve-homelab--staging 210241560576 106855092224 92632272896  54% /mnt/staging
1783817309.3122540920 auto-pve03-20260712T004427Z
1784286547.3484750280 edge-vm-vzdump
1784328679.0591299580 vm160-pve02-20260717T223819Z
1784422327.0155434400 auto-pve03-20260719T004800Z
84995222689	/mnt/staging/vzdump/vm160-pve02-20260717T223819Z
11043732678	/mnt/staging/vzdump/auto-pve03-20260719T004800Z
10813922479	/mnt/staging/vzdump/auto-pve03-20260712T004427Z
28	/mnt/staging/vzdump/vm160-pve02-latest
0	/mnt/staging/vzdump/edge-vm-vzdump
1783817309.2643368520 6327 /mnt/staging/vzdump/auto-pve03-20260712T004427Z/vzdump-qemu-130-2026_07_12-03_44_28.log
1784328313.2842244630 84995216465 /mnt/staging/vzdump/vm160-pve02-20260717T223819Z/vzdump-qemu-160-20260717T223819Z.vma.zst
1784328679.0601299610 6117 /mnt/staging/vzdump/vm160-pve02-20260717T223819Z/vzdump.log
1784422326.9751430340 6332 /mnt/staging/vzdump/auto-pve03-20260719T004800Z/vzdump-qemu-130-2026_07_19-03_48_01.log
=== CONFIG_REFERENCES ===
/usr/local/sbin/homelab-vm160-remote-backup:8:PARENT=/mnt/staging/vzdump
/usr/local/sbin/homelab-backup-edge-vm-vzdump:7:BASE_DIR="/mnt/staging/vzdump/edge-vm-vzdump"
/etc/homelab-backup-matrix/matrix.json:1102:        "/var/lib/homelab-backup-matrix/evidence/vm160_remote_backup/0-vm160-remote-backup.txt"
/etc/homelab-backup-matrix/matrix.json:1104:      "generated_health_output": "/var/lib/homelab-backup-matrix/rendered/vm160-remote-backup.txt",
/etc/homelab-backup-matrix/matrix.json:1105:      "id": "vm160_remote_backup",
/etc/homelab-backup-matrix/matrix.json:1107:        "/var/lib/homelab-health/vm160-remote-backup.txt"
/etc/homelab-backup-matrix/matrix.json:1111:      "name": "vm160-remote-backup",
/etc/homelab-backup-matrix/matrix.json:1112:      "service": "homelab-vm160-remote-backup.service",
/etc/homelab-backup-matrix/matrix.json:1114:      "timer": "homelab-vm160-remote-backup.timer",
/etc/homelab-backup-matrix/matrix.json:1116:        "/var/lib/homelab-health/vm160-remote-backup.txt"
/etc/systemd/system/homelab-vm160-remote-backup.timer:7:Unit=homelab-vm160-remote-backup.service
/etc/systemd/system/homelab-vm160-remote-backup.service:9:ExecStart=/usr/local/sbin/homelab-vm160-remote-backup
/usr/local/sbin/homelab-vm160-remote-backup:9:PREFIX=vm160-pve02-
/usr/local/sbin/homelab-vm160-remote-backup:10:HEALTH=/var/lib/homelab-health/vm160-remote-backup.txt
/usr/local/sbin/homelab-vm160-remote-backup:11:LOCK=/run/lock/homelab-vm160-remote-backup.lock
/usr/local/sbin/homelab-vm160-remote-backup:13:TARGET_WORKER=/usr/local/libexec/homelab-vm160-target-worker
/usr/local/sbin/homelab-vm160-remote-backup:30:LOG="$(mktemp /tmp/vm160-remote-backup.XXXXXX.log)"
/usr/local/sbin/homelab-vm160-remote-backup:37:    printf 'STATUS=FAIL\nSERVICE=homelab-vm160-remote-backup\nTIMESTAMP_UTC=%s\nVMID=%s\nTARGET_DIR=%s\nRC=%s\n' "$TS" "$VMID" "$DIR" "$rc" > "$tmp"
/usr/local/sbin/homelab-vm160-remote-backup:62:printf 'STATUS=OK\nSERVICE=homelab-vm160-remote-backup\nTIMESTAMP_UTC=%s\nVMID=%s\nSOURCE_NODE=pve02\nTARGET_NODE=pve03\nTARGET_DIR=%s\nARCHIVE=%s\nSIZE_BYTES=%s\nSHA256=%s\nREMOTE_RETENTION_GENERATIONS=1\n' "$TS" "$VMID" "$DIR" "$FINAL" "$SIZE" "$SHA" > "$tmp"
/usr/local/sbin/homelab-safe-exec:205:        "homelab-vm160-remote-backup.service",
/usr/local/sbin/homelab-safe-exec:211:        "homelab-vm160-remote-backup.timer",
CHANGES_MADE=NO

OUTPUT_END
CHAT_OUTPUT_END
