Recommended borgmatic.service settings for non-root use? #669
Labels
No Label
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: borgmatic-collective/borgmatic#669
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
I've been running borgmatic as a non-root user on several systems, mainly to backup home directories. The borgmatic.service template is written for root.
I had set up a systemd timer for my user to run borgmatic, but I'm quite unsure about all the options in the above service file. Could we have some guidance on how to adopt that file for a user?
Other notes / implementation ideas
I had been using a very minimal service file to run as my user. It works, but am I missing anything important from the provided template? If I understand correctly, the security and capability settings probably aren't needed. However, I don't know if controlling things like CPU niceness or if using systemd-inhibit are things my non-root user can do.
In any case, this is what I am using. Am I missing anything crucial when compared to the template file? Thank you.
borgmatic.service:
Environment
borgmatic version: 1.7.11
borgmatic installation method: Arch community package
Borg version: 1.2.4
Python version: 3.10.10
Database version (if applicable): n/a
operating system and version: 6.2.9-arch1-1
Great question! I'm no systemd expert, but here's my take:
systemd-inhibit
just prevents system sleep/shutdown while borgmatic is running. If you want to use it from a systemd user service, it looks like you can. But it's up to you as to whether you want that functionality.Hope that helps.
Thank you for the reply!
Interesting about the
systemd-inhibit
call. Since borg supports resumed backups, I'll keep it off the laptop at least.Good call on the verbosity flags... I was wondering where my logs were recently!
Sounds good! I'll close this for now, but feel free to post any followups including findings on using borgmatic with a non-root systemd service.