mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-09-25 09:53:08 +02:00
- surface backup/cleanup cron logs + backup freshness status - email xamxam@erg.be when SQLite backups go stale (backup watchdog) - sync SQLite snapshots to Nextcloud WebDAV + remote-freshness watchdog - precise retention pruning, manual sync in check recipe, and Nextcloud-sync docs
15 lines
883 B
Plaintext
15 lines
883 B
Plaintext
# XAMXAM SQLite backup cron jobs
|
|
# Installed to /etc/cron.d/xamxam-backup (system cron format: minute hour dom month dow user command)
|
|
#
|
|
# Hourly snapshot — kept 30 days
|
|
0 * * * * www-data /usr/local/bin/backup-sqlite.sh >> /var/log/xamxam-backup-$(date +\%Y-\%m-\%d).log 2>&1
|
|
|
|
# Daily snapshot at 2am — kept 90 days
|
|
0 2 * * * www-data RETENTION_DAYS=90 /usr/local/bin/backup-sqlite.sh >> /var/log/xamxam-backup-$(date +\%Y-\%m-\%d).log 2>&1
|
|
|
|
# Push the latest snapshot to Nextcloud WebDAV (daily, after the 2am snapshot)
|
|
20 2 * * * www-data php /usr/local/bin/nextcloud-sync.php >> /var/log/xamxam-backup-$(date +\%Y-\%m-\%d).log 2>&1
|
|
|
|
# Backup watchdog — email xamxam@erg.be when backups go stale (runs 15 min after the hourly snapshot)
|
|
15 * * * * www-data php /usr/local/bin/backup-watchdog.php >> /var/log/xamxam-backup-$(date +\%Y-\%m-\%d).log 2>&1
|