# False impression that CLI and GUI are inter-connected

**URL:** https://forum.duplicati.com/t/false-impression-that-cli-and-gui-are-inter-connected/14812
**Category:** UX
**Created:** [August 8, 2022, 8:40am UTC](https://forum.duplicati.com/t/false-impression-that-cli-and-gui-are-inter-connected/14812 "2022-08-08T08:40:01Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![StefanBrand](https://forum.duplicati.com/user_avatar/forum.duplicati.com/stefanbrand/32/7359_2.png) [@StefanBrand](https://forum.duplicati.com/u/StefanBrand)
#### Post date: [August 8, 2022, 8:40am UTC](https://forum.duplicati.com/t/false-impression-that-cli-and-gui-are-inter-connected/14812/1 "2022-08-08T08:40:02Z")

</div>

Continuing the discussion from [How to restore a single folder via CLI?](https://forum.duplicati.com/t/how-to-restore-a-single-folder-via-cli/14801/7):

> [@How to restore a single folder via CLI?](https://forum.duplicati.com/t/how-to-restore-a-single-folder-via-cli/14801/7):
>
> I’m not sure why, but many people (myself included) seem to have the impression when starting with Duplicati that the CLI and GUI are inter-connected.

Same exact impression on my side (since I have started using Duplicati two years ago). This illusion was busted during my latest hick-up: [Fix corrupted index files and malformed database disk image - #3 by JimboJones](https://forum.duplicati.com/t/fix-corrupted-index-files-and-malformed-database-disk-image/14807/3)

The GUI is good for configuration, but when it comes to restore and repair, I’m more comfortable with direct feedback via CLI.

---

<div class="post-metadata">

### Author: ![ts678](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/t/8491ac/32.png) [@ts678](https://forum.duplicati.com/u/ts678)
#### Post date: [August 8, 2022, 2:23pm UTC](https://forum.duplicati.com/t/false-impression-that-cli-and-gui-are-inter-connected/14812/2 "2022-08-08T14:23:09Z")

</div>

I’m not sure of this topic’s goal. The manual could highlight this, if someone can create a [pull request](https://github.com/kees-z/DuplicatiDocs/pulls).

[Using Duplicati from the Command Line](https://duplicati.readthedocs.io/en/latest/04-using-duplicati-from-the-command-line/) does say (but only in [Backup](https://duplicati.readthedocs.io/en/latest/04-using-duplicati-from-the-command-line/#the-backup-command) section, where export fits best)

> Instead of composing the complete backup command yourself, including all advanced options, you can create a backup job in the Graphical User Interface, without scheduling it. Once completed, you can export the backup job to the command line, resulting in a Duplicati.CommandLine.exe backup command with all settings that you specified in the wizard. You can paste this generated command in your favorite task scheduler. For more information about creating a backup job in the Graphical User Interface, see [Creating a new backup job](https://duplicati.readthedocs.io/en/latest/03-using-the-graphical-user-interface/#creating-a-new-backup-job). For more information about exporting the backup job to the command line, see [Exporting a backup job configuration](https://duplicati.readthedocs.io/en/latest/03-using-the-graphical-user-interface/#exporting-a-backup-job-configuration).

Some historical references and possible answers for people who want some type of integration include:

[Duplicati 2.0 experimental release (with UI)](https://sites.google.com/a/duplicati.com/duplicati/news/duplicati20experimentalreleasewithui) was the 2014 announcement of GUI and some CLI change.  
I can’t say much about the details of what transpired, and that date seems to predate even GitHub use.

[Integration between command line and web interface #2693](https://github.com/duplicati/duplicati/issues/2693) shows how [Duplicati Client](https://github.com/Pectojin/duplicati-client) project began.

> The commandline interface is intentionally separate from the server. The use case is for people who prefer headless commandline tools.

[Feature Request - REST API #4100](https://github.com/duplicati/duplicati/issues/4100) tells the substory of server API reverse-engineering.by @Pectojin

[PowerShell script to run Duplicati GUI jobs](https://forum.duplicati.com/t/powershell-script-to-run-duplicati-gui-jobs/13447) by @JimboJones seems to use similar API-based method.  
This was discussed at the topic linked in original post here, which also covers [–dbpath](https://duplicati.readthedocs.io/en/latest/06-advanced-options/#dbpath) level [integration](https://forum.duplicati.com/t/how-to-restore-a-single-folder-via-cli/14801/6).

That’s not as complete as the API clients, doesn’t fit all uses, but can do better than not giving a dbpath.  
Giving dbpath also runs the risk of a CLI job and a GUI job running at the same time and colliding in DB.  
My impression is that one just gets locked out, with complaints but no other damage, but it’s not proven.

Duplicati CLI’s minimal usage has a completely independent database connected to (I think) destination. Mapping is kept in dbconfig.json file, as opposed to more detailed server config in Duplicati-server.sqlite.

Pure CLI usages sound DB-collision-safe and should be able to start multiple backups at the same time.  
GUI serializes operations, which means it’s not always possible to start at the exact time that one wants.

> [@StefanBrand](#):
>
> restore and repair, I’m more comfortable with direct feedback via CLI.

My gripe with GUI is that it’s easy to miss messages because there are two logging locations being used. Error popup directs you to the [job log](https://duplicati.readthedocs.io/en/latest/03-using-the-graphical-user-interface/#viewing-the-log-files-of-a-backup-job), but job that dies early may log to [server log](https://duplicati.readthedocs.io/en/latest/03-using-the-graphical-user-interface/#viewing-the-duplicati-server-logs) in a different GUI spot.

[Combine logs in GUI #1152](https://github.com/duplicati/duplicati/issues/1152) talks about this. The GUI log also truncates some errors down to single lines which are a nice concise summary but leave one wanting the details that used to be on the lines below…

This message loss sometimes requires a second run watching the live log, or one can set up a [log-file](https://duplicati.readthedocs.io/en/latest/06-advanced-options/#log-file) at whatever [log-file-log-level](https://duplicati.readthedocs.io/en/latest/06-advanced-options/#log-file-log-level) seems right. I have mine turned way up, and pay the price of gigantic log files. When things go wrong, this gives me a good chance of having some actual history to study that problem. Ordinary usage would not call for such a high level, but Information, Retry, or even Verbose might fit well.

Getting off-topic here, but different people prefer things different ways for their reasons. How to explain?  
Some products, e.g. electronic components, publish “application notes”, but our manual isn’t quite there.

Getting back to original post, is there anything besides documentation to reasonably set an impression?

---

<div class="post-metadata">

### Author: ![JimboJones](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/j/e5b9ba/32.png) [@JimboJones](https://forum.duplicati.com/u/JimboJones)
#### Post date: [August 8, 2022, 7:43pm UTC](https://forum.duplicati.com/t/false-impression-that-cli-and-gui-are-inter-connected/14812/3 "2022-08-08T19:43:25Z")

</div>

I’d classify it as more of a presumption than a false impression. The documentation isn’t bad nor does it directly state or elude to the GUI and CLI being linked in that way.

For myself, I just presumed based all on all the functionality and features that Duplicati has, that surely you would be able to call on existing jobs via the CLI. I’m hard-pressed to give a specific “this program does it” type example but as someone who’s been in IT for way too long, I just expected Duplicati to do it given all of it’s other capabilities.

I get that the CLI can be used alone for the head deficient and such but it also seems like it could be probably be setup to talk to the server as well (if present/enabled).

I’m saying this off the cuff, I don’t know if the CLI has room in it’s design to add a few more methods to in particular retrieve but also parse and choose existing jobs from the server component but if it can I think it would be a good feature to add. Most of my C# experience is from Unity but I’ll see if I can’t mangle something up that would at least work as a proof of concept.

I do think some of the documentation could be improved a bit, mainly with more usable examples, a bit less “This is everything you can possibly do.”, more “Here’s what you need to get started for this scenario.” sort of thing. I guess more guides than documentation but either helps. That being said for something that is still in beta the documentation is pretty darn good.
