summaryrefslogtreecommitdiff
path: root/tw/services/restic.scm
diff options
context:
space:
mode:
authorTimo Wilken2023-09-08 23:25:54 +0200
committerTimo Wilken2023-09-08 23:25:54 +0200
commit68ef5a3292122b1c5f3cbf1cfabac6564aae0882 (patch)
treef7d36ad215f9f77c830c2a2b4bae8ce10cccd0b9 /tw/services/restic.scm
parent84f2e3c33538587129c8b3d9898ef1625ccd557b (diff)
Support limiting restic cleanup by hostname
Diffstat (limited to 'tw/services/restic.scm')
-rw-r--r--tw/services/restic.scm2
1 files changed, 2 insertions, 0 deletions
diff --git a/tw/services/restic.scm b/tw/services/restic.scm
index b60d49f6..eda02d3e 100644
--- a/tw/services/restic.scm
+++ b/tw/services/restic.scm
@@ -113,6 +113,7 @@ private restic repos.")
(password-file string "The file name containing the repository password.
Must be readable by the @code{%restic-user}.")
(restic (package restic) "The restic package to use.")
+ (snapshot-host (maybe-string) "Only consider snapshots from this host.")
(snapshot-paths (maybe-list-of-strings) "Only consider snapshots which
include these paths.")
(prune? (boolean #t) "Immediately prune the repo after deleting snapshots.")
@@ -161,6 +162,7 @@ true."
(execl #$(file-append (restic-cleanup-repository-restic repo) "/bin/restic")
"restic" "forget" "--no-cache"
#$@(arg-with-value "--prune" (restic-cleanup-repository-prune? repo))
+ #$@(arg-with-value "--host" (restic-cleanup-repository-snapshot-host repo))
#$@(arg-with-value "--path" (restic-cleanup-repository-snapshot-paths repo))
#$@(arg-with-value "--keep-within" (restic-cleanup-repository-keep-within repo))
#$@(arg-with-value "--keep-last" (restic-cleanup-repository-keep-last repo))