restic-backup-suite: Scheduling
Scheduling restic-backup-suite: the cron job in /etc/cron.d, changing or removing it, the cron log file and what is not provided (systemd timers, lock against parallel runs).
Scheduling
Installing the cron job
sudo ./install.sh --cron
The installer writes /etc/cron.d/restic-backup with this content:
# restic-backup-suite — daily backup at 03:00
# To disable: rm /etc/cron.d/restic-backup
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
0 3 * * * root /usr/local/bin/restic-backup >> /var/log/restic/cron.log 2>&1
The backup then runs daily at 03:00 as root. Output goes to /var/log/restic/cron.log.
- On an already installed system (symlink
/usr/local/bin/restic-backuppresent),--crononly creates the cron job and does nothing else. - The configuration must be filled in before the first run, otherwise the run ends with
Config file not foundor a restic error.
Changing the time or turning it off
Edit the time directly in /etc/cron.d/restic-backup. Running install.sh --cron again overwrites the file with 03:00. To turn it off, delete the file: sudo rm /etc/cron.d/restic-backup.
What is not included
- There are no systemd timers or service units. If you prefer a timer, call
/usr/local/bin/restic-backupyourself. - There is no lock against parallel runs. The scripts do not prevent a second run while the first is still active, only restic's own repository locks apply. Schedule runs so that they do not overlap.
- The scripts' log files (
backup-YYYY-MM-DD.loginLOG_DIR) are not rotated. See Monitoring. - There are no failure notifications. Monitoring works through the marker file.