ServerUtil - How to show running backups

After I had to switch from the old duplicati-client to the new ServerUtil with 2.1.0.2, I noticed that the list-backups command no longer shows which backups are currently running. Is there another way to show which backups are currently running? I think this is really important for the main purpose of the tool, running backups via scripts.

I have not been using duplicati-client, so I am not familiar with how it used to work.
For now there is not a way to show which backup is running.

If you need to script it, I think the output structure is important.
Should it work like an extra command, e.g.:

> server-util server-state
State: Running
ActiveId: 4

Or is it better to have somehow as a part of the list command output?

I would just need the information if any backup is running or not as I wait until a backup task is finished and then run the next task:

docker exec duplicati $client run 1

while [ "$(docker exec duplicati $client list-backups | grep Running:)" ]; do
 sleep 5
done

Ok, I added a new status command that shows if anything is running.

For your use-case, I also added a --wait option, so you can run:

docker exec duplicati $client run 1 --wait

And it will not terminate until the task stops running, it is slightly more robust than just checking if “something” is running as it will only wait for the particular backup job.

Details:

1 Like

Thanks for the quick implementation. I just tested this with 2.1.0.106. The run command always exits with a backup finished message even if there were errors during the backup process. Maybe this could be included in the command output?

Yes, that is a good idea. I have added an issue for returning the backup result.