Implement enhanced crontab management system with automated backups and logging

- Added enhanced crontab entries with comprehensive logging to syslog.
- Created a management script (`manage-enhanced-crontab.sh`) for installing and verifying crontab entries.
- Introduced backup scripts for crontab management, including automated timestamped backups and cleanup.
- Developed documentation for enhanced crontab and multi-system management.
- Established a directory structure for managing crontab backups across multiple systems.
- Implemented error handling and logging for backup operations.
- Added health monitoring and reporting features for backup processes.
This commit is contained in:
Peter Wood
2025-05-26 10:42:07 -04:00
parent b33f6b8e5b
commit aec4878502
11 changed files with 2097 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').
#
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
#
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h dom mon dow command
# 2023-06-11 I can't figure out how to get the nas to mount automagically so here is a band-aid
# @reboot sleep 30 && mount -a
#
# move the files previously backed up at 0100
0 1 * * * /home/acedanger/shell/move-backups.sh
# daily Plex backup at 0415
15 4 * * * /home/acedanger/shell/backup-plex.sh
# daily validation at 0700
0 7 * * * /home/acedanger/shell/validate-plex-backups.sh --fix
# backup immich database
0 5 * * 1 mv /mnt/share/media/immich/uploads/backups/immich-db-backup* /mnt/share/media/backups/immich
# Generate detailed weekly report (Sundays at 0800)
0 8 * * 0 /home/acedanger/shell/validate-plex-backups.sh --report
# Backup created: Mon May 26 10:06:22 AM EDT 2025
# Backup type: pre-install
# System: europa
# User: root