Complete path in crontab is it ok? #445
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#445
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?
Thanks to develop borgmatic!
What I'm trying to do and why
Run via cron borgmatic
Actual behavior (if a bug)
Cronjob with complete path works but only borgmatic doesn't work
Complete path. it works:
Only command does not work:
Expected behavior (if a bug)
I am curious about why it. Can you explain it to me, please?
Other notes / implementation ideas
Environment
borgmatic 1.5.13
borgmatic installation method:
via pip
Borg version: [version here]
borg 1.1.9
Python version: [version here]
Python 3.7.3
operating system and version: [OS here]
Debian Buster
Thanks for the question! What's going on here is that the borgmatic binary is installed in a location (
/usr/local/bin/
) that's not in your defaultPATH
, the set of directories that are searched by default when you type a command. If you're running cron globally / system-wide, then it's running as theroot
user, and thus we're talking about theroot
user'sPATH
. Here are some instructions about modifying thePATH
for borgmatic here: https://torsion.org/borgmatic/docs/how-to/set-up-backups/And here is some general documentation about
PATH
s on Linux: https://www.computerhope.com/issues/ch001647.htmLet me know if that helps!
Your explanation was very useful. Thank you :)
Glad to hear it!