Hi, I am using duplicacy web UI on an unraid server. I figured out where to put the scripts for pre-/post-backup. However, when executing the backup I get an error “no such file or directory”. The files seem to get picked up, because when removed the backup runs smoothly.
The files are owned by root who has execution rights. Any idea what might be wrong?
Are your scripts using full paths?
Just guessing that maybe something in the script is not being found…
Well, I am checking for existence of a file in /backuproot/xyz. When I login to the container I can see the files in the right directory. And I was expecting such an error, so I changed the script to just echo some text. Still I am getting the error.
You can provide some longs, content of your scripts, where the error occurs. Otherwise how don you expect people to help you?
Sure, I am trying to check for a file as follows:
while [ -f /backuproot/user_script.running ];
do
echo “user script still running”
sleep 60;
done;
It is important to provide full context when asking for help, because it’s very exhausting to have to pry details from the user half a spoonful at a time. Where are the answers to the rest of my questions?
You provided a snippet of some script without a context. I don’t know what to do with it.
Is this your post-backup script? pre-backup script? Is it in its entirety? Where is shebang line? Does the interpreter specified in the shebang line exist in the container?
Add echo "hi there hello" > /tmp/highthere.hello
at the beginning, right after shebang line, run backup, then check if that file is created. If so, then you would need to debug the rest of your script.
If not – then likely you are using non-exisrtent interpreter.
The snippet of code was all I have. Context is that my backup consists of two steps:
- collect data from a nextcloud instance using user scripts in unraid
- backup this data using duplicacy.
The pre-backup with the code above is meant to delay the duplicacy backup if the user script is still running.
However, I did as you suggested. And after looking into the logs again I found out that the failure was not in pre-backup but in post-backup which was empty so far. Putting the missing code into it made all working well.
Thx for supporting!