From 2e0d843da54a5827c84eec340dbce9d583c5878a Mon Sep 17 00:00:00 2001 From: Peter Wood Date: Wed, 25 Jun 2025 21:34:28 +0000 Subject: [PATCH] feat: Add daily media backup entry with enhanced logging --- crontab/crontab-backups/io/current-crontab.backup | 1 + crontab/crontab-io.txt | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/crontab/crontab-backups/io/current-crontab.backup b/crontab/crontab-backups/io/current-crontab.backup index bbbadad..42c808b 100644 --- a/crontab/crontab-backups/io/current-crontab.backup +++ b/crontab/crontab-backups/io/current-crontab.backup @@ -2,3 +2,4 @@ 0 4 * * * /home/acedanger/shell/crontab/crontab-backup-system.sh backup auto --auto-cleanup 2>&1 | logger -t crontab-backup -p user.info 0 3 * * * { echo "Starting .env files backup"; /home/acedanger/shell/backup-env-files.sh; echo ".env backup completed with exit code: $?"; } 2>&1 | logger -t env-backup -p user.info 30 8 * * 0 { echo "Starting .env backup validation"; /home/acedanger/shell/validate-env-backups.sh; echo ".env validation completed with exit code: $?"; } 2>&1 | logger -t env-validation -p user.info +30 2 * * * { echo "Starting media backup"; /home/acedanger/shell/backup-media.sh; echo "Media backup completed with exit code: $?"; } 2>&1 | logger -t media-backup -p user.info diff --git a/crontab/crontab-io.txt b/crontab/crontab-io.txt index d18645f..b128d02 100644 --- a/crontab/crontab-io.txt +++ b/crontab/crontab-io.txt @@ -1,5 +1,5 @@ # Enhanced Crontab Entries for IO (Download/Acquisition Server) -# +# # This system runs download management services (Radarr, Sonarr, SABnzbd, etc.) # and should focus on Docker container management rather than media server tasks @@ -18,6 +18,10 @@ # Validates the integrity of .env backup repository 30 8 * * 0 { echo "Starting .env backup validation"; /home/acedanger/shell/validate-env-backups.sh; echo ".env validation completed with exit code: $?"; } 2>&1 | logger -t env-validation -p user.info +# Daily media backup at 0230 with enhanced logging +# Backs up media server configurations and metadata +30 2 * * * { echo "Starting media backup"; /home/acedanger/shell/backup-media.sh; echo "Media backup completed with exit code: $?"; } 2>&1 | logger -t media-backup -p user.info + # Optional: Monitor Docker container health (every 6 hours) # This can help detect if any download services are failing # 0 */6 * * * { echo "Docker health check"; docker ps --format "table {{.Names}}\t{{.Status}}" | grep -v "Up"; } 2>&1 | logger -t docker-health -p user.info