setup rsync.net as a receiver for zrepl
Graham Christensen committed
Oct 28, 2022 at 16:24 UTC
22a04fac6330a133df10d975a722cd98dea2e6cc
1 file changed
+49
delft/haumea.nix
+49
@@ -198,6 +198,10 @@
198
hostNames = [ "lord-nibbler.gsc.io" "67.246.1.194" ];
199
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEjBFLoalf56exb7GptkI151ee+05CwvXzoyBuvzzUbK";
200
};
201
+ rsync-net = {
202
+ hostNames = [ "zh2543b.rsync.net" "2001:1620:2019::324" ];
203
+ publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKlIcNwmx7id/XdYKZzVX2KtZQ4PAsEa9KVQ9N43L3PX";
204
+ };
205
ma27-backup-server = {
206
hostNames = [ "mbosch.me" "135.181.78.102" ];
207
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG6rlyYpWzzt1Fn4c9XdrgzuVqlnhzXz6BRReDVz9I/n";
@@ -288,6 +292,51 @@
292
];
293
};
294
}
295
+ {
296
+ name = "rsyncnet";
297
+ type = "push";
298
+ filesystems."rpool/safe<" = true;
299
+ snapshotting = {
300
+ type = "periodic";
301
+ interval = "5m";
302
+ prefix = "zrepl_snap_";
303
+ };
304
+ connect = {
305
+ identity_file = "/root/.ssh/id_ed25519";
306
+ type = "ssh+stdinserver";
307
+ host = "zh2543b.rsync.net";
308
+ user = "root";
309
+ port = 22;
310
+ };
311
+ pruning = {
312
+ keep_sender = [
313
+ {
314
+ type = "grid";
315
+ regex = "^zrepl_snap_.*";
316
+ grid = lib.concatStringsSep " | " [
317
+ "3x5m"
318
+ "4x15m"
319
+ "24x1h"
320
+ "4x1d"
321
+ "3x1w"
322
+ ];
323
+ }
324
+ ];
325
+ keep_receiver = [
326
+ { type = "grid";
327
+ regex = "^zrepl_snap_.*";
328
+ grid = lib.concatStringsSep " | " [
329
+ "20x5m"
330
+ "96x1h"
331
+ "12x4h"
332
+ "7x1d"
333
+ "52x1w"
334
+ "120x3w"
335
+ ];
336
+ }
337
+ ];
338
+ };
339
+ }
340
{
341
# run with `zrepl signal wakeup safe_ma27` after
342
# snapshots were done from safe.