Check if backup is running on CLI


is there a way to check urbackupsrv if a backup is currently running on CLI (linux)? I want to check this to do a custom cleanup script which deletes obsolete zfs datasets by running urbackupsrv remove-unknown and fetch the datasets on stderr which can’t be deleted by urbackupsrv cleanup.



Solved by myself:

netstat -tp | grep 'urbackupsrv' | grep '35621'

This only works with file backups. On image backup you have to look at the additional connections per host on port 35623.