Exporting a backup config as command line

Since a few months back I have been using the Duplicati 2 GUI to manage my backups. It’s been working great.

Yesterday I decided I wanted to to run a backup job (My picture folder) through a bat-script instead of the GUI-scheduler. I exported the job, disabled the scheduler for the job and it all works well.

However the “Last successful backup” for my picture folder backup in the GUI is no longer being updated when I run the backup manually through my script. Is this normal?

They don’t really coordinate. Any changes made by the command line tool will require the server to repair to discover what’s been changed on the backend.

I recommend interacting with the server api to trigger the runs from command line.

If your server isn’t using authentication it’s pretty easy with tools like curl.
I also built a command line tool for it making it fairly easy to make cli commands against the server API GitHub - Pectojin/duplicati-client: A command line client for controlling the Duplicati Server

The server keeps its own database called Duplicati-server.sqlite to hold the backup configurations and metadata on results. That’s why they’re not available through the Duplicati command line which gets a probably-quite-long set of options from the export unless you use the Pectojin client to drive the server.

Integration between command line and web interface #2693 is available, if you want more on that topic.

From a per-job database point of view, I’d expect the database to be the same one used by the GUI, so performing a repair shouldn’t be necessary to pull things into alignment between database and remote. Updating Last successful backup and other backup statistics can be done by server backup AFAIK.

Thanks for replying everyone :slight_smile:

So I can delete this backup job in the GUI without it affecting the .bat script call?

Assuming you’re talking about Duplicati.CommandLine.exe (not Pectojin client which needs job), yes but
be careful how far you delete it. Assuming the .bat file uses its database via –dbpath, don’t clobber that (I forget whether it specifically asks, plus at one time, perhaps even still, there was a bug that left it behind). Deletion of remote data must (I’m pretty sure) be specifically requested, so make sure you don’t ask that.

EDIT: Making a file export of the config and a copy of the database would be a good precaution if not sure.