From 68ef5a3292122b1c5f3cbf1cfabac6564aae0882 Mon Sep 17 00:00:00 2001 From: Timo Wilken Date: Fri, 8 Sep 2023 23:25:54 +0200 Subject: Support limiting restic cleanup by hostname --- tw/services/restic.scm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tw/services/restic.scm') 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)) -- cgit v1.2.3