Borg CRITICAL [Errno 2] No such file or directory: 'borg': 'borg' #412
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#412
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?
Imported from https://github.com/borgbackup/borg and possibly related to borgmatic.
Have you checked borgbackup docs, FAQ, and open Github issues?
Yes
Is this a BUG / ISSUE report or a QUESTION?
ISSUE
System information. For client/server mode post info for both machines.
Your borg version (borg -V) :
borg 1.1.16
Operating system (distribution) and version :
Linux raspberrypi4 5.10.17-v7l+
How much data is handled by borg?
Around 300 GB
Full borg commandline that lead to the problem (leave away excludes and passwords) :
/home/borg/.local/bin/borgmatic -c /etc/borgmatic/gitea_primary.config.yaml
Describe the problem you're observing.
Hi guys, I'm running borg and it works well.
It's only been a few days since I'm facing an issue. I'm not sure if it's related to borg, borgmatic or something else but I will try to explain.
I'm using a systemd service in order to run backups. The service file looks like the following :
As you can see I'm running the ExecStart command with a user named borg. When I run this service, I get the following error :
But when I'm logging manually with the borg user and running the command placed in the ExecStart, the backup runs successfully.
I don't know where this error could come from. I found similar issues already but no one is related with mine.
Does someone has an idea of where the issue could come from ?
Thanks in advance.
My guess is that even though you're running as the
borg
user in both cases, the user's environment is not being used when running in the systemd service, and therefore borgmatic can't find theborg
executable on the system path.One way to fix that would be to make use of systemd's
Environment
option, which would allow you to set the system path to contain the directory whereborg
is located. If you don't know whereborg
is located, you can just typewhich borg
as theborg
user.Hope that helps! Let me know either way.
I set the system path using the environment option as you said and it worked.
My service file looks like the following now :
Thanks for your answer
Great, I'm glad to hear that did it!