librelad 4ce0340ef8 refactor(backup): replace per-app cron stagger with task-queue scheduler
Application backups were driven by one crontab entry per app, each offset by
id * CFG_BACKUP_CRONTAB_APP_INTERVAL minutes. That minute offset is written
straight into cron's 0-59 minute field, so past ~20 apps it overflowed into
an invalid entry that silently never fired, and the fixed spacing could not
serialize backups that ran longer than the gap.

Replace it with a single daily entry (`libreportal backup scheduled`) that
enqueues a backup task per enabled app. The existing systemd task processor
drains them serially — no minute overflow, real serialization, and backups
are now visible/cancellable in the Tasks UI. Per-app enable is read from
CFG_<APP>_BACKUP at schedule time instead of being mirrored into crontab.

Removes the stagger machinery (timing/setup/check/remove scripts), the
now-unused cron_jobs table + insert, and the CFG_BACKUP_CRONTAB_APP_INTERVAL
config knob and its WebUI field.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: librelad <librelad@digitalangels.vip>
2026-05-22 14:34:35 +01:00

52 lines
1.7 KiB
Bash
Executable File

#!/bin/bash
# This file is auto-generated by generate_arrays.sh
# Do not edit manually - run './scripts/source/files/generate_arrays.sh run' to regenerate
backup_scripts=(
"backup/app/backup_app_all.sh"
"backup/app/backup_app_delete.sh"
"backup/app/backup_app_hooks.sh"
"backup/app/backup_app_schedule.sh"
"backup/app/backup_app_start.sh"
"backup/app/backup_schedule_all.sh"
"backup/engine/backup_ssh.sh"
"backup/engine/borg_backup.sh"
"backup/engine/borg_check.sh"
"backup/engine/borg_env.sh"
"backup/engine/borg_forget.sh"
"backup/engine/borg_init.sh"
"backup/engine/borg_install.sh"
"backup/engine/borg_restore.sh"
"backup/engine/borg_snapshots.sh"
"backup/engine/engine_dispatch.sh"
"backup/engine/kopia_backup.sh"
"backup/engine/kopia_check.sh"
"backup/engine/kopia_env.sh"
"backup/engine/kopia_forget.sh"
"backup/engine/kopia_init.sh"
"backup/engine/kopia_install.sh"
"backup/engine/kopia_restore.sh"
"backup/engine/kopia_snapshots.sh"
"backup/engine/restic_backup.sh"
"backup/engine/restic_check.sh"
"backup/engine/restic_dump.sh"
"backup/engine/restic_env.sh"
"backup/engine/restic_forget.sh"
"backup/engine/restic_init.sh"
"backup/engine/restic_install.sh"
"backup/engine/restic_restore.sh"
"backup/engine/restic_snapshots.sh"
"backup/locations/location_add.sh"
"backup/locations/location_loader.sh"
"backup/locations/location_migrate.sh"
"backup/locations/location_paths.sh"
"backup/locations/location_remove.sh"
"backup/locations/location_ssh.sh"
"backup/manifest/manifest_collect.sh"
"backup/manifest/manifest_read.sh"
"backup/manifest/manifest_write.sh"
"backup/verify/backup_verify.sh"
)