aboutsummaryrefslogtreecommitdiff
path: root/tw/system/vin.scm
diff options
context:
space:
mode:
Diffstat (limited to 'tw/system/vin.scm')
-rw-r--r--tw/system/vin.scm38
1 files changed, 37 insertions, 1 deletions
diff --git a/tw/system/vin.scm b/tw/system/vin.scm
index 3076fd8f..41842b4e 100644
--- a/tw/system/vin.scm
+++ b/tw/system/vin.scm
@@ -56,11 +56,47 @@
(service restic-cleanup-service-type
(list (restic-cleanup-repository
;; Laptop backups run at "0 */2 * * *".
- (schedule #~"10 5 * * *") ; daily at 05:10
+ (schedule #~"0 5 * * *")
(url "/var/backups/restic/timo/laptop")
(password-file "/etc/restic/timo-laptop")
(keep-within "14d")
(keep-weekly 52)
+ (keep-monthly -1))
+
+ ;; Phone backups run with a new version of restic, which creates
+ ;; v2 repos by default. Guix' older restic version can't read
+ ;; these, so create the repo on the server before pushing to it.
+ ;; Restic doesn't automatically upgrade the repo version.
+ ;;
+ ;; Phone backups run "hourly" (modulo Android's throttling of
+ ;; the Restic app), but the underlying data changes at most once
+ ;; a day, so use `keep-daily' instead of `keep-within'.
+
+ (restic-cleanup-repository
+ (schedule #~"0 3 * * *")
+ (url "/var/backups/restic/timo/phone")
+ (password-file "/etc/restic/timo-phone")
+ (snapshot-paths '("/storage/FF37-F8E6/SignalBackup"))
+ ;; We only really care about the last signal backup, but guard
+ ;; against accidental deletion by keeping more.
+ (keep-daily 7))
+
+ (restic-cleanup-repository
+ (schedule #~"0 4 * * *")
+ (url "/var/backups/restic/timo/phone")
+ (password-file "/etc/restic/timo-phone")
+ (snapshot-paths '("/storage/emulated/0/Backups"))
+ (keep-daily 14)
+ (keep-monthly -1))
+
+ (restic-cleanup-repository
+ ;; OAndBackupX/NeoBackup backups can run until the early-ish
+ ;; morning; cleanup once they're all done and pushed.
+ (schedule #~"0 9 * * *")
+ (url "/var/backups/restic/timo/phone")
+ (password-file "/etc/restic/timo-phone")
+ (snapshot-paths '("/storage/FF37-F8E6/OAndBackupX"))
+ (keep-daily 14)
(keep-monthly -1))))
(server-base-services host-name)))