Make sure network-online.target gets triggered correctly: https://systemd.io/NETWORK_ONLINE/
Run the following:
sudo systemctl daemon-reload
# make sure tailscale is up
# systemctl enable --now tailscaled
# tailscale up --reset=true --accept-routes=false --stateful-filtering=false
sudo systemctl enable --now nas-ping.service
sudo systemctl enable --now mnt-restic.mount/etc/restic/config.sh/etc/restic/password/usr/local/sbin/restic-simple-backup/usr/local/sbin/system-backup
Make sure the files have the correct permissions:
sudo chmod 0600 /etc/restic/config.sh
sudo chmod 0600 /etc/restic/password
sudo chmod 0755 /usr/local/sbin/restic-simple-backup
sudo chmod 0755 /usr/local/sbin/system-backupInitialize a restic repository (only for the first time):
sudo su
source /etc/restic/config.sh
restic initCreate a backup manually:
sudo system-backupCheck the snapshots:
sudo su
source /etc/restic/config.sh
restic snapshotsRun the following:
sudo systemctl daemon-reload
sudo systemctl enable system-backup.service
sudo systemctl enable --now system-backup.timer