Running Duplicacy from inside a docker container doesn't seem to change working dir

Hi.
I’m trying to run Duplicacy from inside a docker container.
I run several containers, and each of them has a directory inside a directory called backuproot/appdata/docker-containers/
I’m trying to backup a single container of these (binhex-code-server), and I have tried the following commands:

docker exec -it -w /backuproot/appdata/docker-containers/binhex-code-server/ Duplicacy /config/bin/duplicacy_linux_x64_3.2.3 backup -stats

docker exec -it Duplicacy sh -c “cd /backuproot/appdata/docker-containers/binhex-code-server && /config/bin/duplicacy_linux_x64_3.2.3 backup -stats”

And running commands like:

docker exec -it -w /backuproot/appdata/docker-containers/binhex-code-server/ Duplicacy pwd

gives the output:

/backuproot/appdata/docker-containers/binhex-code-server
So it DOES change working directory as intended

But when the backup starts, I see this

Skipped non-regular file backuproot/appdata/docker-containers/binhex-code-server/code-server/user-data/code-server-ipc.sock
Skipped non-regular file backuproot/appdata/docker-containers/binhex-qbittorrentvpn/qBittorrent/config/ipc-socket

Which leads me to believe that Duplicacy tries to backup the complete backuproot/appdata/docker-containers folder

But why?
What am I missing here?
Thanks

EDIT:
An update here.
Even running Duplicacy from within the folder makes it go outside the working directory.

cd /backuproot/appdata/docker-containers/swag/
/config/bin/duplicacy_linux_x64_3.2.3 backup -stats

Shows Skipped non-regular file backuproot/appdata/docker-containers/binhex-qbittorrentvpn/qBittorrent/config/ipc-socket after a time

Personally I think it would be more intuitive to tell Duplicacy what folder to backup instead of having to cd into it.

None of that is going to work. It works accidentally, because somewhere above in the folder tree you have .duplicacy folder.

If this is a container of duplicacy_web, and you want to run CLI manually, then you need to cd to /caches/localhost/<N> where N is the index of the backup, and run backup from there.

If you want to run duplicacy CLI manually, there is no need for WebUI. You can initialize completely independent duplicacy repository for use with CLI and avoid all these complexities.

duplicacy need to know path to the configuration directory. Configuration directory does not have to be in the root of repository, even though by default it is. See init.

Thanks for answering.

It is a Duplicacy Web container running on Unraid. AFAIK there is no CLI container.
Seems more logical to me to use CLI, since the plan is to stop all containers except Duplicacy before backup.
I could time it and stop the containers with a script, and then start the backup in Web shorty after.

Not sure I understand. /cache/localhost/N is where the storage is or the repository is?

Isn’t the web version just a frontend for the cli?
So if I take a backup in cli I cannot see it and restore it via web?

Thanks

You don’t need a container for CLI. It’s already self-contained executable.

Consider using pre-backup and post-backup scripts for duplicacy to stop and restart external containers before and after backup.

Duplicacy_web creates temporary repositories for duplicacy in the /caches/localhost/… or whatever ~/.duplicacy_web/repositories/… is mapped intro in that container. Those numbered folders correspond to backups configured in the web UI. Inside there are .duplicacy folders with configuration that point to the storage and repository location, and where you would put your pre- and post-backup scripts if you wanted to.

yes

You can. The only drawback is that the stats may not update properly in the web ui.

But in your case it seems you can accomplish everything you need within the WebUI (plus manually adding pre/post scripts because web UI does not provide an interface to do so yet)

So just install it as a regular linux package on the Unraid server?

Yeah, I think I need to figure out how to walk that route

Thanks

It’s not distributed though any package system, but you can download a binary and copy it to /usr/local/bin. Three are no dependencies.

It’s in the documentation: Pre Command and Post Command Scripts · gilbertchen/duplicacy Wiki · GitHub