fix(backup): treat 7z exit code 1 (warning) as success in archive_staging
All checks were successful
Check scripts syntax / check-scripts-syntax (push) Successful in 14s
Test Kubernetes backup scripts / test-automated-nfs-backup (push) Successful in 15s
Test Kubernetes backup scripts / test-k3s-control-plane-config-backup (push) Successful in 15s
Haven Notify Build and Deploy / Test Haven Notify (push) Successful in 2m8s
Haven Notify Build and Deploy / Build Haven Notify Image (PR) (push) Has been skipped
Haven Notify Build and Deploy / Build Haven Notify Image (push) Successful in 29s
Haven Notify Build and Deploy / Deploy Haven Notify (internal) (push) Successful in 7s

Exit code 1 from 7z means a non-fatal warning — the archive IS created,
just some files couldn't be compressed (e.g. broken symlinks, special
files). Previously the function required filtered output to be empty
alongside rc=1, causing any non-errno=2 stderr line to abort the entire
backup and discard the archive.

Now any rc=1 is treated as success (warning is still logged).
This commit is contained in:
2026-07-24 06:10:41 -03:00
parent 0433c30118
commit ceee89f86b

View File

@@ -437,7 +437,7 @@ archive_staging() {
fi fi
if (( rc == 0 )); then if (( rc == 0 )); then
return 0 return 0
elif (( rc == 1 )) && [[ -z "$filtered_output" ]]; then elif (( rc == 1 )); then
return 0 return 0
fi fi
return 1 return 1