Trying to use CLI with Web GUI, it is a huge mess

I’ve tried searching the forum for how to do this, and have been unsuccessful. Please please please, this should really be in the documentation as this is NOT user friendly at all.

All I want to do is use the CLI to perform commands (but specifcally, prune) on backups I have created using the Web GUI. (As an aside, there should 100% be a way to execute a prune from the Web GUI, but let’s continue.)

On my system, Arch Linux, Duplicacy is installed in ~/.duplicacy-web/. So the actual engine is in ~/.duplicacy-web/bin. Ok fine. I’ve been able to determine that you have to cd to the repository directory to run commands on it. Ok, I’ve cd’d to ~/.duplicacy-web/repositories/localhost/0, and I try running the engine with command “list”. And it almost works- I’m using B2 as my storage backend, so it says Repository set to XXX, Storage set to b2:/XXX, then it prompts me for credentials.

Here is what I’ve been able to find on the forums. You can use duplicacy_web to do print-credentials (or something like that) and that makes a file that the CLI can use? That’s awkward! I just want to tell the CLI engine via env variable or argument, where the duplicacy.json config is- the same thing the Web UI uses, so I don’t have to mess around with generating/finding the credentials that Duplicacy already knows about.

So.

  1. How do I tell the command line engine where the configs are for the Web UI so it can automatically find my already saved storage credentials?
  2. Can you please improve the documentation, or make the Web UI more functional so these kind of antics are not necessary?

Instead of reverse engineering and hacking the WebGUI’s internal implementation details why not setup an entirely new repository somewhere in /tmp/ to do prune with CLI?

On the other hand — a feature request may be in order to add a button to WebUI to launch shell with the correct environment set so that duplicacy command can be used when manual intervention is required.

WebUI passes credentials in the environment to the duplicacy CLI process (which is rather insecure, but that’s another discussion)

In the GUI, create a schedule and add a prune job to it…

1 Like

Thank you, that is helpful.