Cron + borgmatic + "set -e" = unknown error #131
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#131
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 made a small wrapper around borgmatic and it runs completely fine manually.
But when I run it with crontab, it doesn't work.
The issue comes from this line:
set -e
which exits on any error.So when ran manually as root it works, but when ran with cron as root, it doesn't work.
I google a bit and found this: https://stackoverflow.com/questions/2870130/why-does-using-set-e-cause-my-script-to-fail-when-called-in-crontab
They say it might be an environment variable issue. But I don't use any, it's only hardcoded values in my script. So I looked at the borgmatic conf and only found the {hostname} thing, but I don't know if it's related.
Do you have an idea what may be failing in that case?? it's making me stuck for few days already :'(
Not related to borgmatic haha
I'm curious.. What was it?
I called a python script with the pre-hook in borgmatic, and that required me to set a specific locale for it to work (dunno if it's a bug from the script or from my installation) and it didn't work in cron because cron has default locale I guess
So I'm gonna try to change the default locale so I avoid this kind of bug in the future, let's pray :p
Got it. Hope that works!