@@ -475,7 +475,7 @@ Put this file in `/bin`:
|
||||
Put this files in `/etc/systemd/system/`:
|
||||
* `status-email-user@.service`: A service that can notify you via email when a systemd service fails. Edit the target email address in this file.
|
||||
|
||||
Now edit `restic-backup.service` and `status-email-user.service` to call this service failure.
|
||||
Now edit `restic-backup@.service` and `status-email-user@.service` to call this service failure.
|
||||
```
|
||||
OnFailure=status-email-user@%n.service
|
||||
```
|
||||
@@ -492,7 +492,7 @@ To use this, wrap the restic script command with it in your cron file like:
|
||||
### Optional: No Backup on Metered Connections (Linux/systemd only)
|
||||
For a laptop, it can make sense to not do heavy backups when your on a metered connection like a shared connection from you mobile phone. To solve this we can set up a systemd service that is in success state only when a connection is unmetered. Then we can tell our backup service to depend on this service simply! When the unmetered service detects an unmetered connection it will go to failed state. Then our backup service will not run as it requires this other service to be in success state.
|
||||
|
||||
1. Edit `restic-backup.service` and `restic-check.service` to require the new service to be in success state:
|
||||
1. Edit `restic-backup@.service` and `restic-check@.service` to require the new service to be in success state:
|
||||
```
|
||||
Requires=nm-unmetered-connection.service
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user