borg handler should display error messages on separate lines
Here's an example message received by mail using a borg handler rule with borg 1.2.4 on the client side (Debian stable):
*failed* -- /etc/backup.d/90.borg
== fatal errors from /etc/backup.d/90.borg ==
Info: Repository was already initialized
Error: Remote: Borg 0.29.0: exception in RPC call: Remote: Traceback (most recent call last): Remote: File ".../borgbackup-0.29.0/borg/remote.py", line 96, in serve Remote: TypeError: open() takes from 2 to 5 positional arguments but 7 were given Remote: Command 'uname -p 2> /dev/null' is not in the allowed list. Remote: Platform: FreeBSD ... 13.1-RELEASE-p3 FreeBSD 13.1-RELEASE-p3 rsync_13_1 amd64 Remote: Python: CPython 3.4.3 Remote: Please note: If you see a TypeError complaining about the number of positional arguments given to open(), you can ignore it if it comes from a borg version < 1.0.7. This TypeError is a cosmetic side effect of the compatibility code borg clients >= 1.0.7 have to support older borg servers. This problem will go away as soon as the server has been upgraded to 1.0.7+. Killed stale lock ...@117286549492085.15781-0. Removed stale exclusive roster lock for host ...@117286549492085 pid 15781 thread 0.
Removed stale exclusive roster lock for host ...@117286549492085 pid 15781 thread 0. Killed
Fatal: Failed backing up source.
AFICS, there are several errors, starting with 'Remote:', and maybe an info message (Killed stale lock, etc.).
It would be much easier to have Remote messages on individual lines, and as a side effect this would avail issues with mail forwarding such as "message has lines too long for transport" when there are more issues reported :-/
Also there may be something weird here due to error reported whereas it's just a stale lock removal... but that's another issue, I guess.
Hope this makes sense, and I understand correctly what's happening there.
Best regards,
Edited by Olivier Berger