Best approach to read "backup in progress" state

Hi guys,

I’m using duplicati on an Ubuntu based file server in my household. Because I’m not constantly using the file server I’ll power it off when unused. This “automation” is done via Home Assistant + Node Red.

Of course I want to prevent a system shutdown during a running backup. For that I would like to implement a state machine, which validates, that no backup is in progress before shuting down the system.
What is the best approach on checking for any “backups in progress”?
I guess the dumbest approach would be to check on the linux process and measure the load. But for me the perfect solution would be a kind of MQTT or REST API call.
Is there something inbetween? Has someone done this before (maybe via MQTT)?

Thanks a lot guys!

Greetings from Austria

You could use the excellent duplicati-client command line utility. It will talk to the running Duplicati web server engine and you can easily check the server status.

Here’s an example on Windows, but for Ubuntu you’d just run the python script version of course:


Welcome to the forum @Clusters

Another option might be to fuser the job’s Local database path to see if Duplicati has it open at the time.
A less reliable (maybe) additional option is Duplicati scripts before and after backup to record its status.

Ideally interrupted backups pick up nicely next time, but being kinder to Duplicati likely helps its reliability.

Thank you a lot!

I looked into both suggestions and in the end I turned to the really cool duplicati-client (which I was not aware of). I just wrote a small python-web-listener-wrapper and I got all I ever wanted! :heart: