Last successful run and available versions not updated in Web UI

Someone at Github discovered something that seems to be a bug:

When exporting a backup to the Command line and running that command, a backup is made successfully. Files from this backup can be restored using the Web UI. However, The last successful run and the number of available versions are not updated in the Web UI. So if you start with 3 snapshots and run a backup from the command prompt, the Web UI still reports 3 versions, but you can choose from 4 versions when doing a restore.

This video demonstrates it:


Before making a backup (0:09), 3 versions are available.
After a backup has run from the command line (4:16) there are still 3 versions reported by the Web UI.
But in the Restore wizard (4:24), there is an extra snapshot to choose from.
Link to the Github issue:

It is “as designed” the commandline tool does not interact with the server at all, and does its “own thing”. I have commented on the Github issue explaining that another tool is needed that can send commands to the server from the commandline.

I was expecting this information is stored in the local database of the backup job that is used by the Command line tool, but I suppose it’s in Duplicati-server.sqlite.
In the Restore wizard, the list of available snapshots is populated almost instantly. This list includes backups that were run by the CL tool. Maybe the Web UI can poll this data on a regular base or at startup time? This will keep the statistics shown on the main page up-to-date.

There are two databases in use: Duplicati-server.sqlite and the “local database”. When you export the command, it includes a path to the local database, such that it works the same.

The server works such that it records the results of a backup run in Duplicati-server.sqlite. When you view the list of backups to restore, this is read from the local database.

I understand that using the commandline is surprising, but the commandline is meant to work completely without the server component, for use in true commandline-only environments.

That is a possibility, but I am not sure when it should do this update.

1 Like

The Command line tool can help in situations when the built-in scheduler in the Web UI doesn’t suffice. Think of running the backups using usnig multiple identities, scheduling backup tasks after reboot, logon, lock screen or an event. You can use the Windows Task Scheduler to do this, but this is not (yet) implemented in the built-in scheduler.

I suppose at least every time the Web UI is started, optionally with added scans at regular intervals. To speed things up, the Web UI engine could check timestamps of the local databases used by backup tasks. If a timestamp has been changed since the last check, a query could be executed to check for updates.