fix(sgx): treat rsync exit code 24 as success in backup

Files vanishing during transfer is expected for mail directories
where messages are constantly moved.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Harald Hoyer 2026-04-01 15:37:43 +02:00
parent 9e212934dd
commit a6736c2ac1

View file

@ -29,6 +29,10 @@ in
]; ];
backupPrepareCommand = '' backupPrepareCommand = ''
HOME=/root ${pkgs.rsync}/bin/rsync -e "${pkgs.openssh}/bin/ssh" --exclude-from /root/excludelist --no-specials --no-devices --numeric-ids --delete-after --partial -axz backup@mx.surfsite.org:/{etc,var,home,root} ${backup_new_path} HOME=/root ${pkgs.rsync}/bin/rsync -e "${pkgs.openssh}/bin/ssh" --exclude-from /root/excludelist --no-specials --no-devices --numeric-ids --delete-after --partial -axz backup@mx.surfsite.org:/{etc,var,home,root} ${backup_new_path}
rc=$?
# exit code 24 = files vanished during transfer (normal for mail dirs)
if [ $rc -eq 24 ]; then exit 0; fi
exit $rc
''; '';
}; };