Are you running borgmatic as the root user? If so, then you don't need
sudo
at all.
I run borgmatic as a root, but it doesn't work without sudo the same.
This is my borgmatic.service…
Yes,
sudo
would be needed if you're running as a non-root user. But be aware thatsudo
can prompt for a password, which would be problematic if used non-interactively.
strangely, this…
I generally don't recommend running borgmatic from borgmatic, just to avoid the risk of infinite recursion. And
borgmatic umount
is really a thin wrapper aroundumount
, so you're not losing…
I haven't tested it, but you might be able to just do something like:
before_backup: umount /your/mount/point
I would recommend trying it both with the…
You are right! Probably these two options /^^^ are influencing, from man:
Thank you for pointing my attention. Actually, the idea is to protect files from accidental changing by…
I have created systems service and time units:
Okay, it looks like that systemd service/timer is running as the root user. That's good. So does your full sudo command work when run from…
Is it possible to use sudo in hooks somehow or what to use?
In theory, yes—if you're running as the root user and sudo-ing to a non-root user. So when you're running borgmatic, what…