slaprunner: fix argument list too long in exporter script when there is too many files
/reviewed-on nexedi/slapos!415
Showing
-
Maintainer
thanks, if I understood well the command will become :
<$backup_directory_path | xargs -0 sha256sum | sort -k 66 > "$tmp_backup_sum"
-
Owner
No. Either
<$backup_directory_path xargs -0 sha256sum | sort -k 66 > "$tmp_backup_sum"
or
xargs -0 sha256sum <$backup_directory_path | sort -k 66 > "$tmp_backup_sum"
BTW,
sleep 5
deserves a comment if it's actually useful. Otherwise, I'd do without a temporary file:find -path "./runner/instance/slappart*/srv/backup/*" -type f -print0 | xargs -r -0 sha256sum | sort -k 66 > "$tmp_backup_sum"
Note the -r option to xargs. And stop if
$tmp_backup_sum
is empty. -
Maintainer
Yes, this is good:
find -path "./runner/instance/slappart*/srv/backup/*" -type f -print0 | xargs -r -0 sha256sum | sort -k 66 > "$tmp_backup_sum"
not sure why there is
sleep 5
but I think it can be removed. Maybe @Nicolas can confirm.
Please register or sign in to comment