feat: verify scheduled backups
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Installs a daily 03:15 host cron job. Run from WSL after setting an offsite mount if desired.
|
||||
root_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
line="15 3 * * * cd $root_dir && BACKUP_RETENTION_DAYS=30 ./scripts/backup.sh >> data/backup-cron.log 2>&1"
|
||||
(crontab -l 2>/dev/null | grep -Fv "scripts/backup.sh"; echo "$line") | crontab -
|
||||
printf 'Installed daily backup cron job. Inspect with: crontab -l\n'
|
||||
Reference in New Issue
Block a user