database-backup-image/backup.sh
Adam Štrauch 2ab7be67fa
All checks were successful
Build a dev image / build (push) Successful in 6s
Release of a new version / build (release) Successful in 7s
Add error handling and improve backup scripts for consistency
2025-10-18 23:15:26 +02:00

17 lines
482 B
Bash

#!/bin/bash
set -e
if [ "$1" = "local" ]; then
source /backup_local.sh
elif [ "$1" = "restic" ]; then
source /backup_restic.sh
elif [ "$1" = "loop" ]; then
# Infinite loop to keep the container running and let Ofelia scheduler (or any other) manage the execution
echo "Entering infinite loop mode. Use external scheduler to trigger backups."
while true; do
sleep 86400
done
else
echo "Unknown backup method. Use 'local', 'loop or 'restic'."
fi