diff options
author | lassulus <lassulus@lassul.us> | 2017-07-22 21:59:00 +0200 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2017-07-22 21:59:00 +0200 |
commit | f4a192f5f83d5e8a88c0e287b45c0fadf12f6907 (patch) | |
tree | 67b52d0e24ff815acd5ecac378517efbd192f5d1 /krebs/2configs | |
parent | 06f2f92476efea4f75457b937a1d60bb4d347c12 (diff) |
krebs: init backup.nix
Diffstat (limited to 'krebs/2configs')
-rw-r--r-- | krebs/2configs/backup.nix | 21 | ||||
-rw-r--r-- | krebs/2configs/default.nix | 3 |
2 files changed, 24 insertions, 0 deletions
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 <stockholm/lib>; +{ + 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 <stockholm/lib>; { + imports = [ + ./backup.nix + ]; krebs.enable = true; krebs.tinc.retiolum.enable = true; |