boreal: prune backups older than a month
This commit is contained in:
parent
bc74de3fc6
commit
71c4871af0
|
@ -47,6 +47,14 @@ in
|
|||
borg-backup = {
|
||||
enable = true;
|
||||
repo = secrets.borg-backup.boreal-repo;
|
||||
# for a workstation, having backups spanning the last month should be
|
||||
# enough
|
||||
prune = {
|
||||
keep = {
|
||||
daily = 7;
|
||||
weekly = 4;
|
||||
};
|
||||
};
|
||||
paths = [
|
||||
"/home/alarsyo"
|
||||
];
|
||||
|
|
|
@ -14,6 +14,18 @@ in {
|
|||
description = "Borgbase repo info. Required.";
|
||||
};
|
||||
|
||||
prune = mkOption {
|
||||
type = types.attrs;
|
||||
default = {
|
||||
keep = {
|
||||
daily = 7;
|
||||
weekly = 4;
|
||||
monthly = 6;
|
||||
};
|
||||
};
|
||||
description = "pruning options for borg";
|
||||
};
|
||||
|
||||
paths = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
|
@ -57,11 +69,7 @@ in {
|
|||
doInit = true;
|
||||
compression = "auto,zstd";
|
||||
startAt = "daily";
|
||||
prune.keep = {
|
||||
daily = 7;
|
||||
weekly = 4;
|
||||
monthly = 6;
|
||||
};
|
||||
prune = cfg.prune;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue