mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-09-18 17:27:24 +00:00
fix(Mastercontainer): exit daily-backup.sh early if restore is running
If the backup container is currently running in restore mode, the daily backup script now exits immediately instead of waiting indefinitely for the container to stop. This prevents the daily backup cron from interrupting long-running restores. Fixes: #8414 Assisted-by: GitHub Copilot:claude-sonnet-4
This commit is contained in:
@@ -13,6 +13,15 @@ if ! [ -f "$CONFIG_FILE" ] || (! grep -q "wasStartButtonClicked.*1" "$CONFIG_FIL
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Exit early if the backup container is currently running a restore
|
||||
if docker ps --format "{{.Names}}" | grep -q "^nextcloud-aio-borgbackup$"; then
|
||||
if grep -q '"backup-mode".*"restore"' "$CONFIG_FILE"; then
|
||||
echo "Backup container is running in restore mode. Exiting to not interrupt the restore..."
|
||||
rm -f "/mnt/docker-aio-config/data/daily_backup_running"
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
# Daily backup and backup check cannot be run at the same time
|
||||
if [ "$DAILY_BACKUP" = 1 ] && [ "$CHECK_BACKUP" = 1 ]; then
|
||||
echo "Daily backup and backup check cannot be run at the same time. Exiting..."
|
||||
|
||||
Reference in New Issue
Block a user