summaryrefslogtreecommitdiffstats
path: root/tv/2configs/backup.nix
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2015-12-28 21:00:27 +0100
committermakefu <github@syntax-fehler.de>2015-12-28 21:00:27 +0100
commit72d821d96cc7c19134773d6a07317bf7d6c2465c (patch)
tree8d30a69e6feb2a3de26591a87f1acdaba7f5a758 /tv/2configs/backup.nix
parent246116dabbe849e75612fbdb57b01696913ff27e (diff)
parent5a9ccbef0abe1f3acb16d716a2e1d7faa9bb0af1 (diff)
Merge remote-tracking branch 'cd/master'
Diffstat (limited to 'tv/2configs/backup.nix')
-rw-r--r--tv/2configs/backup.nix42
1 files changed, 42 insertions, 0 deletions
diff --git a/tv/2configs/backup.nix b/tv/2configs/backup.nix
new file mode 100644
index 000000000..51d3bb8a7
--- /dev/null
+++ b/tv/2configs/backup.nix
@@ -0,0 +1,42 @@
+{ config, lib, ... }:
+with lib;
+{
+ krebs.backup.plans = addNames {
+ xu-test-cd = {
+ method = "push";
+
+ src = { host = config.krebs.hosts.xu; path = "/tmp/xu-test"; };
+ dst = { host = config.krebs.hosts.cd; path = "/tmp/backups/xu-test"; };
+
+ #startAt = "0,6,12,18:00";
+ startAt = "minutely";
+ snapshots = {
+ minutely = { format = "%Y-%m-%dT%H:%M"; retain = 5; };
+ hourly = { format = "%Y-%m-%dT%H"; retain = 4; };
+ daily = { format = "%Y-%m-%d"; retain = 7; };
+ weekly = { format = "%YW%W"; retain = 4; };
+ monthly = { format = "%Y-%m"; retain = 12; };
+ yearly = { format = "%Y"; };
+ };
+ };
+ #xu-test-wu = {
+ # method = "push";
+ # dst = { user = tv; host = wu; path = "/krebs/backup/xu-test"; };
+ #};
+ cd-test-xu = {
+ method = "pull";
+ src = { host = config.krebs.hosts.cd; path = "/tmp/cd-test"; };
+ dst = { host = config.krebs.hosts.xu; path = "/tmp/backups/cd-test"; };
+ startAt = "minutely";
+ snapshots = {
+ minutely = { format = "%Y-%m-%dT%H:%M"; retain = 5; };
+ hourly = { format = "%Y-%m-%dT%H"; retain = 4; };
+ daily = { format = "%Y-%m-%d"; retain = 7; };
+ weekly = { format = "%YW%W"; retain = 4; };
+ monthly = { format = "%Y-%m"; retain = 12; };
+ yearly = { format = "%Y"; };
+ };
+ };
+
+ };
+}