[Errno 2] No such file or directory: 'borg' #114
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#114
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?
I've been struggling for a few days with the following error message when i start borgmatic via cron.
"[Errno 2] No such file or directory: 'borg'"
I can't figure out where the error is coming from. If I start borgmatic without cron, i don't get an error message.
I also use borgmatic on another server with the same configuration. Since the error does not occur there, i would assume that the problem has to do with the backup job.
Is there a way to narrow this down further?
Thank you
Mark
Hi Mark,
I'm guessing that this problem is due to cron running by default without setting the PATH, or perhaps with an incorrect path, meaning that the Borg binary can't be found. My recommendation is to modify your borgmatic invocation via cron to include the appropriate system PATH, thereby allowing borgmatic to find Borg. Here's an example: https://projects.torsion.org/witten/borgmatic/src/branch/master/sample/cron/borgmatic
Your particular Borg binary location may be different than
/usr/local/bin
though. You can find it by running:which borg
Let me know if that works!
bull's eye! The working server knowns the path to borg, the other not.
Thank you for your hint!
Cool, glad to hear that worked out!
Ahhrg. Sorry, tested this on the wrong server.
My problem server also knowns the path to the borg binary. But i will try your hint with the path variable in the cron job. I'll come back to you.
Your mentioned hint with the PATH in the cronjob fixed my issue.
And again something learned.
Great!