diff options
author | Mike Crute <mike@crute.us> | 2020-05-09 17:55:35 -0700 |
---|---|---|
committer | Mike Crute <mike@crute.us> | 2020-05-09 17:55:35 -0700 |
commit | 309787a43b86b87ffb8e394e54788018def6cad1 (patch) | |
tree | 8811fe940441d7dd3c1232cd018e3fafc9f12960 /.linux | |
parent | b379b78d669b92b46134204c3289e38fe08a4d63 (diff) | |
download | dotfiles-309787a43b86b87ffb8e394e54788018def6cad1.tar.bz2 dotfiles-309787a43b86b87ffb8e394e54788018def6cad1.tar.xz dotfiles-309787a43b86b87ffb8e394e54788018def6cad1.zip |
Add laptop backup services
Diffstat (limited to '.linux')
-rw-r--r-- | .linux/systemd/laptop-backup.service | 12 | ||||
-rw-r--r-- | .linux/systemd/laptop-backup.timer | 8 |
2 files changed, 20 insertions, 0 deletions
diff --git a/.linux/systemd/laptop-backup.service b/.linux/systemd/laptop-backup.service new file mode 100644 index 0000000..8fb5119 --- /dev/null +++ b/.linux/systemd/laptop-backup.service | |||
@@ -0,0 +1,12 @@ | |||
1 | [Unit] | ||
2 | Description=backup laptop with restic | ||
3 | |||
4 | [Service] | ||
5 | Type=oneshot | ||
6 | Environment="RESTIC_REPOSITORY=rest:http://schroeder.sea1.crute.me:6275/mcrute-devices" | ||
7 | Environment="RESTIC_PASSWORD_FILE=%h/.restic-key" | ||
8 | ExecCondition=ping -q -c1 -W1 -w1 schroeder.sea1.crute.me | ||
9 | ExecStart=restic backup --exclude-file %h/.backup-filter %h | ||
10 | |||
11 | [Install] | ||
12 | WantedBy=timers.target | ||
diff --git a/.linux/systemd/laptop-backup.timer b/.linux/systemd/laptop-backup.timer new file mode 100644 index 0000000..008e7f3 --- /dev/null +++ b/.linux/systemd/laptop-backup.timer | |||
@@ -0,0 +1,8 @@ | |||
1 | [Unit] | ||
2 | Description=Run laptop backup with restic daily | ||
3 | |||
4 | [Timer] | ||
5 | OnCalendar=*-*-* 00:00:00 | ||
6 | |||
7 | [Install] | ||
8 | WantedBy=default.target | ||