rustic
rustic copied to clipboard
Throw ERROR instead of WARN when source can't be sanitized
This is not a bug per se but unexpected behaviour for me:
I run rustic as a systemd service with an on-failure dependency that alerts me to errors. However, rustic hasn't been doing backups for a while because i removed one of the backup source directories so it stopped with [WARN] error sanitizing source="...
As this is a WARN and not an ERROR, my systemd service didn't throw an error and i wasn't alerted to the fact, that no backups were being made.
I would like rustic to throw an ERROR when a backup doesn't succeed for any reason. Either as default behaviour or as an option/flag. This would be important for me for unattended use of rustic.
@Schweber Thanks for opening the issue! I also think we should improve error handling. For backup there are many cases for warnings
However, note that #927 (which in fact means that even in error cases rustic currently doesn't return an error code) is still open. Until this is fixed, systemd's OnFailure doesn't work independent from how we classify errors...
Oh sorry, i overlooked this issue. Thank you for your quick response!