database-backup-image/backup.sh
Adam Štrauch 89deb6eec9
All checks were successful
Build a dev image / build (push) Successful in 10s
Release of a new version / build (release) Successful in 11s
Update error message to include 'loop' as a valid backup method
2025-10-18 19:34:41 +02:00

14 lines
392 B
Bash

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