add prune options for backups
This commit is contained in:
parent
482463c8d4
commit
7d82ca8f5d
@ -218,7 +218,7 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
restic = let
|
restic = let
|
||||||
mkBackup = repo: paths: exclude: {
|
mkBackup = repo: paths: exclude: pruneOpts: {
|
||||||
repository = "sftp:u169497-sub5@u169497.your-storagebox.de:${repo}";
|
repository = "sftp:u169497-sub5@u169497.your-storagebox.de:${repo}";
|
||||||
passwordFile = config.sops.secrets."restic_${repo}_repository_password".path;
|
passwordFile = config.sops.secrets."restic_${repo}_repository_password".path;
|
||||||
initialize = true;
|
initialize = true;
|
||||||
@ -227,6 +227,7 @@ in {
|
|||||||
];
|
];
|
||||||
paths = paths;
|
paths = paths;
|
||||||
exclude = exclude;
|
exclude = exclude;
|
||||||
|
pruneOpts = pruneOpts;
|
||||||
timerConfig = {
|
timerConfig = {
|
||||||
OnCalendar = "00:05";
|
OnCalendar = "00:05";
|
||||||
RandomizedDelaySec = "1h";
|
RandomizedDelaySec = "1h";
|
||||||
@ -234,8 +235,8 @@ in {
|
|||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
backups = {
|
backups = {
|
||||||
documents = mkBackup "documents" ["/tank/documents"] [];
|
documents = mkBackup "documents" ["/tank/documents"] [] ["-d 7" "-w 5" "-m 12"];
|
||||||
images = mkBackup "images" ["/tank/images"] ["/tank/images/import"];
|
images = mkBackup "images" ["/tank/images"] ["/tank/images/import"] ["-d 7" "-w 5" "-m 12"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user