haumea/zrepl WIP: reduce snapshot count
We repeatedly run out of space on Haumea.
Vladimír Čunát committed
Jun 23, 2024 at 15:04 UTC
5429e8890a02858ae02fd994ead51c34148658c2
1 file changed
+18
-7
build/haumea/zrepl.nix
+18
-7
@@ -22,7 +22,7 @@
22
filesystems."rpool/safe<" = true;
23
snapshotting = {
24
type = "periodic";
25
- interval = "15m";
25
+ interval = "1h";
26
prefix = "zrepl_snap_";
27
hooks = [ {
28
# https://zrepl.github.io/master/configuration/snapshotting.html#postgres-checkpoint-hook
@@ -33,14 +33,23 @@
33
};
34
pruning = {
35
keep_sender = [
36
+ { type = "not_replicated"; }
37
{
38
type = "grid";
39
regex = "^zrepl_snap_.*";
40
grid = lib.concatStringsSep " | " [
40
- "4x15m"
41
- "24x1h"
42
- "4x1d"
43
- "3x1w"
41
+ "1x1h"
42
+ "1x2h"
43
+ "1x4h"
44
+ # "grid" acts weird if an interval isn't a whole-number multiple
45
+ # of the previous one, so we jump from 8h to 24h
46
+ "2x8h"
47
+ "1x1d"
48
+ "1x2d"
49
+ "1x4d"
50
+ "1x8d"
51
+ # At this point we keep 9 snapshots spanning 8--16 days (depends on moment),
52
+ # with exponentially increasing spacing (almost).
53
];
54
}
55
];
@@ -48,8 +57,10 @@
57
{ type = "grid";
58
regex = "^zrepl_snap_.*";
59
grid = lib.concatStringsSep " | " [
51
- "96x1h"
52
- "12x4h"
60
+ "1x1h"
61
+ "1x2h"
62
+ "1x4h"
63
+ "2x8h"
64
"7x1d"
65
"52x1w"
66
];