From f4a192f5f83d5e8a88c0e287b45c0fadf12f6907 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 22 Jul 2017 21:59:00 +0200 Subject: krebs: init backup.nix --- krebs/2configs/backup.nix | 21 +++++++++++++++++++++ krebs/2configs/default.nix | 3 +++ 2 files changed, 24 insertions(+) create mode 100644 krebs/2configs/backup.nix diff --git a/krebs/2configs/backup.nix b/krebs/2configs/backup.nix new file mode 100644 index 000000000..7ee438784 --- /dev/null +++ b/krebs/2configs/backup.nix @@ -0,0 +1,21 @@ +{ config, lib, ... }: +with import ; +{ + krebs.backup.plans = { + } // mapAttrs (_: recursiveUpdate { + snapshots = { + daily = { format = "%Y-%m-%d"; retain = 7; }; + weekly = { format = "%YW%W"; retain = 4; }; + monthly = { format = "%Y-%m"; retain = 12; }; + yearly = { format = "%Y"; }; + }; + }) { + wolf-share-puyak = { + method = "pull"; + src = { host = config.krebs.hosts.wolf; path = "/home/share"; }; + dst = { host = config.krebs.hosts.puyak; path = "/bku/wolf-share"; }; + startAt = "03:00"; + }; + }; +} + diff --git a/krebs/2configs/default.nix b/krebs/2configs/default.nix index 901516e50..daf9bd9d0 100644 --- a/krebs/2configs/default.nix +++ b/krebs/2configs/default.nix @@ -2,6 +2,9 @@ with import ; { + imports = [ + ./backup.nix + ]; krebs.enable = true; krebs.tinc.retiolum.enable = true; -- cgit v1.2.3