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