systemd service from repo broken #275
Labels
No Label
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: borgmatic-collective/borgmatic#275
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What I'm trying to do and why
install system service and timer
Steps to reproduce (if a bug)
follow documentation on borgmatic website
Include (sanitized) borgmatic configuration files if applicable.
Actual behavior (if a bug)
[/etc/systemd/system/borgmatic.service:18] Unknown lvalue 'LogRateLimitIntervalSec' in section 'Service'
Jan 01 14:48:39 systemd[1]: [/etc/systemd/system/borgmatic.service:21] Executable path is not absolute, ignoring: sleep 1m
Jan 01 14:48:39 systemd[1]: [/etc/systemd/system/borgmatic.service:22] Executable path is not absolute, ignoring: systemd-inhibit --who=
Jan 01 14:48:39 systemd[1]: borgmatic.service: Service lacks both ExecStart= and ExecStop= setting. Refusing.
Expected behavior (if a bug)
service and timer should work
Thank you for reporting this. Do you know what version of systemd/journald you're using? It appears that the
LogRateLimitIntervalSec
option at theService
level was added back in 2018, and possibly released in systemd version 240. You can check your systemd version with journalctl like this:If you have an old version of systemd, that could explain why the
LogRateLimitIntervalSec
option isn't working. You could just omit the option, or set it globally (but then it would affect more than just borgmatic). Or, if possible, upgrade systemd.Let me know if that's it!
As for the other two errors, I've just switched the sample systemd configuration file to use absolute paths.
Didnt have time to investigate further, just a quick update on the SystemD version:
systemd 232 (this is a regular Debian Stretch install)
Look like that version's from March 2017. What I did was add a comment to the sample borgmatic systemd recommend that the option can be removed with older versions of systemd. (However, systemd may rate-limit borgmatic logs without the option.)
Hope that helps! Thanks again for filing this.
The change to absolute paths (
24e1516ec5
) causesborgmatic.service
to no longer work on Debian-based distros, where bothsleep
andsystemd-inhibit
are found in/bin
rather than/usr/bin
.Can anybody think of a way to make this more cross-platform with
Environment=
or something? Or/usr/bin/env sleep 1m
?I've just reverted that changeset. According to the systemd docs, absolute paths are not required. So let's not use them if they're causing cross-distro problems!
I appreciate you mentioning this.