Help with duplicacy pre and post backup scripts

I read this post
I am running docker in a container in unRaid and I want to use it to backup my containers and I need to stop them to backup properly. I passed to the container a volume that maps docker socket and runned the container as privileged this used to work with the backup solutions I have been using (duplicati) when I run the job backup it says that it doesnt have permission to acces docker socket. What can I do?

Few things here.

Which container are you using? Duplicacy may be running as a user without the necessary permissions, regardless of whether the container itself is privileged.

Another thing — you can eliminate this complexity altogether, See this recent discussion: How to generate ssh keys in dupkicacy web ui docker container on unraid - #6 by saspus

I am using this container
How can I know wich user is being used in the container? if I type whoami its says im root.
I checked the discussion and this works thanks.

    -e PUID=1000 \
    -e PGID=1000 \

Hence, duplicacy is running as user 1000 of group 1000. You can change this to 0 if you want duplicacy to run as root. But I strongly suggest against it.

Instead, use sudo in your pre/post backup scripts, and configure sudoers file to allow duplicacy user perform the specific tasks you are doing.

That would be ideal indeed. I’m not a fan of docker gymnastics where containers take control over the host.