parent
7f301a4d96
commit
5f217e5a31
3 changed files with 17 additions and 1 deletions
|
|
@ -397,7 +397,7 @@ in
|
|||
|
||||
Service =
|
||||
{
|
||||
Type = "simple";
|
||||
Type = "oneshot";
|
||||
|
||||
X-RestartIfChanged = true;
|
||||
RuntimeDirectory = serviceName;
|
||||
|
|
|
|||
|
|
@ -106,6 +106,19 @@ in
|
|||
"--keep-hourly 3"
|
||||
];
|
||||
};
|
||||
|
||||
prune-opts = {
|
||||
inherit passwordFile paths exclude;
|
||||
initialize = true;
|
||||
repository = "/home/alice/repos/prune-opts";
|
||||
pruneOpts = [
|
||||
"--keep-yearly 4"
|
||||
"--keep-monthly 3"
|
||||
"--keep-weekly 2"
|
||||
"--keep-daily 2"
|
||||
"--keep-hourly 3"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -268,6 +268,9 @@ in
|
|||
assert int(actual) == 8, \
|
||||
f"Expected a snapshot count of 8 but got {actual}"
|
||||
|
||||
with subtest("Prune opts"):
|
||||
systemctl_succeed_as_alice("start restic-backups-prune-opts.service")
|
||||
|
||||
logout_alice()
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue