borgbase / vorta

Desktop Backup Client for Borg Backup
https://vorta.borgbase.com
GNU General Public License v3.0
2.02k stars 134 forks source link

Backup does not finish when scripts exits delayed #2117

Open frosch01 opened 3 weeks ago

frosch01 commented 3 weeks ago

Description

I observe that Vorta is not finishing a backap when a Post-Backup-Script is in use that does not exit immediately but takes some processing time. The script can be really simple, e.g. using a sleep.

#!/bin/bash

echo "Now sleeping for 2 secs"
sleep 2
echo "Sleep finished"

exit 0

As the Start Backup button is pressed, a rotating progress indicator as part of the Start_Backup button is shown. It would be expected that this finished after few secs but it does not. Hitting the cancel button aborts the waiting state and the backup shows up in the Archive list, too. But it is not clear if the script ran to the end or not.

As the sleep is commented in the script, things work as expected.

I was able to reproduce the issue always.

Environment

Logs

2024-10-31 15:15:41,833 - vorta.borg.borg_job - INFO - Creating archive at XXXXXXXXXXX
2024-10-31 15:15:42,111 - vorta.scheduler - INFO - Setting timer for profile 1
2024-10-31 15:15:42,112 - vorta.scheduler - DEBUG - Scheduling next run for 2024-11-01 12:00:00
2024-10-31 15:15:47,567 - vorta.borg.jobs_manager - DEBUG - Finish job for site: 1
2024-10-31 15:15:47,567 - vorta.borg.jobs_manager - DEBUG - No more jobs for site: 1
2024-10-31 15:21:17,450 - vorta.borg.borg_job - DEBUG - Cancel job on site default
2024-10-31 15:21:17,450 - vorta.borg.borg_job - DEBUG - Cancel job on site 1
2024-10-31 15:21:17,451 - vorta.borg.jobs_manager - INFO - Finished cancelling all jobs