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)?
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.