sudo install -Dm644 [email protected] /etc/systemd/system/.- For each target:
- Place the options (exclude, etc) and paths in the variable
BACKUP_OPTIONS="..."in/etc/restic/TARGET/config. Newlines can be escaped with backslashes. - Place the repository path in
/etc/restic/TARGET/repository. - Place the repository password in
/etc/restic/TARGET/password.
- Place the options (exclude, etc) and paths in the variable
- To run the backups on a schedule, create a
.timerfile in/etc/systemd/system/based onrestic.timer.example, set the schedule and target unit, thensystemctl enable --now whatever.timer. - To run the backups manually, just
systemctl startit.
- Logs for the most recent execution will be stored in
/var/log/restic/TARGET.log. - The credentials will be sercurely passed to restic, and will not be accessible to normal users via systemd IPC or the process list.
- The restic process will be run as a dynamic restic user, and will have read-only access to all files on the system.