feat: Add daily system backup and integrity check for Plex database with enhanced logging

This commit is contained in:
Peter Wood
2025-05-26 14:21:54 -04:00
parent c9b69ea789
commit d60c5ceeac
4 changed files with 13 additions and 7 deletions

View File

@@ -3,10 +3,12 @@
# These entries include comprehensive logging to syslog with proper tags
# and error handling for better monitoring and troubleshooting
# Daily Docker backup at midnight (original racknerd job)
# Enhanced with proper logging and error handling
0 0 * * * { echo "Starting Docker backup"; /home/acedanger/shell/backup-docker.sh; echo "Docker backup completed with exit code: $?"; } 2>&1 | logger -t docker-backup -p user.info
# Daily system backup at 0400 with auto-cleanup
0 4 * * * /home/acedanger/shell/crontab/crontab-backup-system.sh backup auto --auto-cleanup 2>&1 | logger -t crontab-backup -p user.info
# Optional: Add a health check entry to monitor backup jobs (every 6 hours)
# This can help detect if the backup process is failing
# 0 */6 * * * { echo "Cron health check - Docker backup job scheduled"; ps aux | grep "backup-docker" | grep -v grep | wc -l; } 2>&1 | logger -t cron-health -p user.info