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.
Thanks. I was looking for this.
I am using Autosuspend linux package to suspend the server if its idle for some time.
How to integrate this with Autosuspend Activity Check?
I want to prevent suspend if an image backup is running
If you check this UrBackup will try to shut down the server if it has been idle for some time. This also causes too old backups to be deleted when UrBackup is started up instead of in a nightly job.
In the Windows server version this works without additional work as the UrBackup server process runs as a SYSTEM user which can shut down the machine. On Linux the UrBackup server runs as a limited user which normally does not have the right to shut down the machine. UrBackup instead creates the file ’/var/urbackup/shutdown_now’, which you can check for existence in a cron script e.g.:
if test -e /var/urbackup/shutdown_now
then
shutdown -h +10
fi