summaryrefslogtreecommitdiff
path: root/.linux
diff options
context:
space:
mode:
authorMike Crute <mike@crute.us>2020-05-10 01:09:06 +0000
committerMike Crute <mike@crute.us>2020-05-10 01:25:49 +0000
commitc73be7f94bbd1877199074f5f66d7b061b8f77f7 (patch)
tree0f8ea9a012735741734fa52f0432a5f27b7c93d7 /.linux
parent309787a43b86b87ffb8e394e54788018def6cad1 (diff)
downloaddotfiles-c73be7f94bbd1877199074f5f66d7b061b8f77f7.tar.bz2
dotfiles-c73be7f94bbd1877199074f5f66d7b061b8f77f7.tar.xz
dotfiles-c73be7f94bbd1877199074f5f66d7b061b8f77f7.zip
Make backup one-size-fits-all
Diffstat (limited to '.linux')
-rw-r--r--.linux/systemd/laptop-backup.timer8
-rw-r--r--.linux/systemd/system-backup.service (renamed from .linux/systemd/laptop-backup.service)9
-rw-r--r--.linux/systemd/system-backup.timer10
3 files changed, 17 insertions, 10 deletions
diff --git a/.linux/systemd/laptop-backup.timer b/.linux/systemd/laptop-backup.timer
deleted file mode 100644
index 008e7f3..0000000
--- a/.linux/systemd/laptop-backup.timer
+++ /dev/null
@@ -1,8 +0,0 @@
1[Unit]
2Description=Run laptop backup with restic daily
3
4[Timer]
5OnCalendar=*-*-* 00:00:00
6
7[Install]
8WantedBy=default.target
diff --git a/.linux/systemd/laptop-backup.service b/.linux/systemd/system-backup.service
index 8fb5119..b4569ab 100644
--- a/.linux/systemd/laptop-backup.service
+++ b/.linux/systemd/system-backup.service
@@ -1,11 +1,16 @@
1[Unit] 1[Unit]
2Description=backup laptop with restic 2Description=backup system with restic
3
4ConditionPathExists=%h/.restic-key
5ConditionPathExists=%h/.backup-filter
3 6
4[Service] 7[Service]
5Type=oneshot 8Type=oneshot
9
10ExecCondition=ping -q -c1 -W1 -w1 schroeder.sea1.crute.me
11
6Environment="RESTIC_REPOSITORY=rest:http://schroeder.sea1.crute.me:6275/mcrute-devices" 12Environment="RESTIC_REPOSITORY=rest:http://schroeder.sea1.crute.me:6275/mcrute-devices"
7Environment="RESTIC_PASSWORD_FILE=%h/.restic-key" 13Environment="RESTIC_PASSWORD_FILE=%h/.restic-key"
8ExecCondition=ping -q -c1 -W1 -w1 schroeder.sea1.crute.me
9ExecStart=restic backup --exclude-file %h/.backup-filter %h 14ExecStart=restic backup --exclude-file %h/.backup-filter %h
10 15
11[Install] 16[Install]
diff --git a/.linux/systemd/system-backup.timer b/.linux/systemd/system-backup.timer
new file mode 100644
index 0000000..8edddb7
--- /dev/null
+++ b/.linux/systemd/system-backup.timer
@@ -0,0 +1,10 @@
1[Unit]
2Description=Run system backup with restic daily
3
4[Timer]
5OnCalendar=*-*-* 00:00:00
6AccuracySec=8h
7RandomizedDelaySec=15m
8
9[Install]
10WantedBy=default.target