hooks command parameter spaces not allowed #414
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#414
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?
What I'm trying to do and why
I am running borgmatic in a docker container on the latest version of unraid.
I have created a script to send a notification to unraid in case of error from within the container. The command is executed through a ssh to unraid. The script expects several parameters. Everything works as exepected when I do not put spaces in the parameters. If I try to insert parameters enclosed within '' or "" or " escaped or ' escaped, the borg job crashes telling that the yaml file is not correctly built.
I have tried the same script from a shell within the container and it works with spaces in the parameters enclosed within "".
Actual behavior (if a bug)
WORKING:
This way the job runs smoothly without any issue
NOT WORKING
Error generated:
Log File content:
Environment
borgmatic version: 1.5.12
Use
sudo borgmatic --version
orsudo pip show borgmatic | grep ^Version
borgmatic installation method: Docker Container
Borg version: 1.1.15
Use
sudo borg --version
Python version: 3.8.5
Use
python3 --version
Database version (if applicable): psql 12.5
Use
psql --version
ormysql --version
on client and server.operating system and version: Unraid 6.8.2
Thank you for the detailed bug report! It really helps in diagnosing.
So here's the thing—the spaces aren't the problem! It's the colon. Specifically, the one in
HA-Dockermon:
(I think that makes YAML interpret your command as a YAML dictionary rather than a string.)So, a couple of ways around this:
Let me know if either of those ends up working for you! YAML has its strengths, but it's not perfect for embedding moderately complicated shell commands.
Dear witten,
Thank you for this rapid feedback. I really appreciate the time you spent answering my request. Morevover when your reply and propsal is working as expected.
I simply removed the colon and managed to make it work.
Thanks again and have a nice week.
Denis
I'm glad to hear that did it!