CHAT_OUTPUT_BEGIN
COMMAND_ID=BACKUP-UNSAFE-SOURCE-CAPTURE-072
STATUS=OK
RC=0
HOST=pve01
MODE=change
COMPONENT=backup-audit
REFERENCE_REGISTER_CHECK=OK
REFERENCE_SHA256=5763f2f8edc75fcf6f3951f8c95896d1cc112ceccb6cf5b64a383f540a4deb8e
ERROR_REGISTER_CHECK=OK
ERROR_REGISTER_SHA256=f6d592c8d53021fe9feeb81a7e0cca33f4b44501143f6378290486e46d250bb1
COMMAND_SHA256=f79a127b4f27e1cdf886c681d5c7257244ec31a6c903e96cd53fc75d7a1ed8d4
DUPLICATE_FAILED_COMMAND_BLOCKED=false
EXECUTION_STARTED=true
CHANGES_MADE=true
SANITIZED=yes
SECRETS_INCLUDED=no
PRIVATE_ADDRESSES_INCLUDED=no
RAW_EVIDENCE_SHA256=b3a164a5b5260930b012305a47a24bc11db166e2bf6a6f25bfd1e1914941c5c7
SANITIZED_OUTPUT_SHA256=b3a164a5b5260930b012305a47a24bc11db166e2bf6a6f25bfd1e1914941c5c7
OUTPUT_BEGIN
========== NODE=pve01 PIPELINE=/usr/local/sbin/appbackup-dockge-stacks ==========
FILE=/usr/local/sbin/appbackup-dockge-stacks,MODE=700,OWNER=root:root,SIZE=4097,MTIME=2026-07-10 04:14:10.050376764 +0300
--- RELEVANT_LINES ---
14:RA="${REMOTE_A%/}/${NODE}/apps/${APP}/${JOB}"
15:RB="${REMOTE_B%/}/${NODE}/apps/${APP}/${JOB}"
16:RAL="${REMOTE_A%/}/${NODE}/apps/${APP}/latest-backup-index.json"
17:RBL="${REMOTE_B%/}/${NODE}/apps/${APP}/latest-backup-index.json"
30:rm -rf "$PAYLOAD"
32:SHA="$(sha256sum "$STAGE/$ARCHIVE" | cut -d" " -f1)"
51:echo "[STEP] local checksum"
52:(cd "$STAGE" && sha256sum "$ARCHIVE" manifest.json latest-backup-index.json > checksums.sha256 && sha256sum -c checksums.sha256 && tar -tzf "$ARCHIVE" >/dev/null && jq -e . manifest.json >/dev/null)
54:echo "[STEP] upload cloud A metadata"; rclone copy "$STAGE" "$RA" --exclude "$ARCHIVE" --exclude "$ARCHIVE.sha256" --transfers=4 --checkers=8 --retries=5 --low-level-retries=20 --stats=30s
55:echo "[STEP] upload cloud A archive chunks"; rclone deletefile "$RA/$ARCHIVE" >/dev/null 2>&1 || true; CHUNK_TMP_BASE="${CHUNK_TMP_BASE:-/mnt/staging/rclone-chunks}" homelab-rclone-copy-chunked "$STAGE/$ARCHIVE" "$RA/$ARCHIVE"
56:echo "[STEP] upload cloud B metadata"; rclone copy "$STAGE" "$RB" --exclude "$ARCHIVE" --exclude "$ARCHIVE.sha256" --transfers=4 --checkers=8 --retries=5 --low-level-retries=20 --stats=30s
57:echo "[STEP] upload cloud B archive chunks"; rclone deletefile "$RB/$ARCHIVE" >/dev/null 2>&1 || true; CHUNK_TMP_BASE="${CHUNK_TMP_BASE:-/mnt/staging/rclone-chunks}" homelab-rclone-copy-chunked "$STAGE/$ARCHIVE" "$RB/$ARCHIVE"
58:echo "[STEP] verify cloud A chunked"; CHUNK_TMP_BASE="${CHUNK_TMP_BASE:-/mnt/staging/rclone-chunks}" homelab-stage-verify-chunked "$RA" "$ARCHIVE" "$VERIFY/a" "$JOB"
59:echo "[STEP] verify cloud B chunked"; CHUNK_TMP_BASE="${CHUNK_TMP_BASE:-/mnt/staging/rclone-chunks}" homelab-stage-verify-chunked "$RB" "$ARCHIVE" "$VERIFY/b" "$JOB"
60:echo "[STEP] upload latest index"; rclone copyto "$STAGE/latest-backup-index.json" "$RAL"; rclone copyto "$STAGE/latest-backup-index.json" "$RBL"; rclone cat "$RAL" | jq -e --arg job "$JOB" ".job_id == \$job" >/dev/null; rclone cat "$RBL" | jq -e --arg job "$JOB" ".job_id == \$job" >/dev/null
76:rm -rf "$STAGE" "$VERIFY"
--- UNIT_REFERENCES ---
UNSAFE_SOURCE_CAPTURE=COMPLETE

OUTPUT_END
CHAT_OUTPUT_END
