mirror of
https://github.com/acedanger/shell.git
synced 2025-12-06 07:50:11 -08:00
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:
@@ -0,0 +1,41 @@
|
||||
# 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:13:54 AM EDT 2025
|
||||
# Backup type: initial
|
||||
# System: europa
|
||||
# User: root
|
||||
# Full system info: Linux europa 6.1.0-33-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.133-1 (2025-04-10) x86_64 GNU/Linux
|
||||
Reference in New Issue
Block a user