Skip to content

v3.2.2 - Cron Fallback Scheduler & CLI Fixes

Choose a tag to compare

@wnstfy wnstfy released this 19 Feb 10:38
· 42 commits to main since this release
Immutable release. Only release title and notes can be modified.
v3.2.2
38b1724

Highlights

This release adds a cron fallback scheduler for environments without systemd (Alpine Linux, RHEL/CentOS 6, Docker containers) and fixes five CLI bugs affecting restore, status, and backup listing commands.

Added

  • Cron Fallback Scheduler (BACKUPD-038): Automatic scheduling on non-systemd systems
    • Auto-detects scheduler: systemd → cron → manual instructions
    • New lib/scheduler.sh module with unified API
    • detect_scheduler() — Returns "systemd", "cron", or "none"
    • oncalendar_to_cron() — Converts OnCalendar expressions to cron format
    • Cron entries managed via /etc/cron.d/backupd
    • Scripts detect BACKUPD_CRON=1 and add 0-5 min random delay (simulates RandomizedDelaySec)
    • Status display shows scheduler type: "(systemd)" or "(cron)"
    • Full multi-job support with cron fallback in create_job_timer()
    • Uninstall cleans up cron entries automatically
    • Target systems: Alpine Linux, RHEL/CentOS 6, Docker containers

Fixed

  • CLI Trap Scope (BACKUPD-037): Fixed temp_output: unbound variable error on script interrupt — changed trap from RETURN EXIT INT TERM to RETURN only
  • Exit Code Masking (BACKUPD-037): Fixed CLI returning exit code 1 on success — now captures exit code into variable before exit
  • Restore Script Path (BACKUPD-037): Fixed restore db/files failing with "script not found" — uses unified restore.sh with RESTORE_TYPE env var
  • List Backups (BACKUPD-037): Fixed restore --list showing legacy rclone patterns — now queries restic snapshots --tag
  • Status Command (BACKUPD-037): Fixed status returning exit code 1 when log files have no matches — added || true to grep pipelines

Technical

  • New lib/scheduler.sh module (373 lines) with OnCalendar-to-cron conversion
  • Cron entries include nice -n 10 ionice -c3 for systemd parity
  • Generated scripts embed BACKUPD_CRON=1 check with random delay
  • scheduler.sh added to install.sh and updater.sh module lists

Checksums

See SHA256SUMS file for verification.