Update backup policy
This commit is contained in:
parent
e938eb26a8
commit
1a46a65c00
1 changed files with 10 additions and 24 deletions
|
|
@ -31,7 +31,7 @@
|
|||
jobs = let
|
||||
archiveBaseName = "archive";
|
||||
backupBaseName = "backup";
|
||||
pushConfig = name: grid: {
|
||||
pushConfig = name: snapshot: grid: {
|
||||
type = "push";
|
||||
name = "push-${name}";
|
||||
connect = {
|
||||
|
|
@ -41,12 +41,13 @@
|
|||
};
|
||||
filesystems."zactive/main/home" = true;
|
||||
send.encrypted = true;
|
||||
snapshotting.type = "manual";
|
||||
snapshotting = snapshot;
|
||||
pruning = {
|
||||
keep_sender = [
|
||||
{
|
||||
type = "regex";
|
||||
type = "grid";
|
||||
regex = "^zrepl-.*";
|
||||
grid = lib.concatStringsSep " | " ["1x1h(keep=all)" "24x1h" "7x1d" "4x1w"];
|
||||
}
|
||||
];
|
||||
keep_receiver = [
|
||||
|
|
@ -73,27 +74,12 @@
|
|||
recv.placeholder.encryption = "off";
|
||||
};
|
||||
in [
|
||||
{
|
||||
type = "snap";
|
||||
name = "snapshot";
|
||||
filesystems."zactive/main/home" = true;
|
||||
snapshotting = {
|
||||
type = "periodic";
|
||||
prefix = "zrepl-";
|
||||
interval = "1h";
|
||||
};
|
||||
pruning = {
|
||||
keep = [
|
||||
{
|
||||
type = "grid";
|
||||
regex = "^zrepl-.*";
|
||||
grid = lib.concatStringsSep " | " ["1x1h(keep=all)" "24x1h" "7x1d" "4x1w"];
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
(pushConfig archiveBaseName ["1x1h(keep=all)" "30x1d" "52x1w"])
|
||||
(pushConfig backupBaseName ["8x13w"])
|
||||
(pushConfig archiveBaseName {
|
||||
type = "periodic";
|
||||
prefix = "zrepl-";
|
||||
interval = "1h";
|
||||
} ["1x1h(keep=all)" "30x1d" "52x1w"])
|
||||
(pushConfig backupBaseName {type = "manual";} ["8x13w"])
|
||||
(sinkConfig archiveBaseName "zarchive/snapshot")
|
||||
(sinkConfig backupBaseName "zbackup/snapshot")
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue