extraCreateArgs escapes the args, breaking them because they are not expanded by bash, being passed from systemd through an env var. Easier to understand with the repro:
Steps To Reproduce
Steps to reproduce the behavior:
Set up a borgbackup job test with extraCreateArgs = [ "--exclude-caches" ]
systemctl cat borgbackup-job-test will have a line Environment="extraCreateArgs='--exclude-caches'"
systemctl start borgbackup-job-test will then fail with borg create: error: argument ARCHIVE: "'--exclude-caches'": No archive specified
Manually setting extraCreateArgs correctly in the preHook works around the issue.
Expected behavior
It should work as expected, I assume the same issue applies to other extraArgs parameters.
Describe the bug
extraCreateArgs
escapes the args, breaking them because they are not expanded by bash, being passed from systemd through an env var. Easier to understand with the repro:Steps To Reproduce
Steps to reproduce the behavior:
test
withextraCreateArgs = [ "--exclude-caches" ]
systemctl cat borgbackup-job-test
will have a lineEnvironment="extraCreateArgs='--exclude-caches'"
systemctl start borgbackup-job-test
will then fail withborg create: error: argument ARCHIVE: "'--exclude-caches'": No archive specified
preHook
works around the issue.Expected behavior
It should work as expected, I assume the same issue applies to other extraArgs parameters.
Notify maintainers
@dotlambda