summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/backup.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2018-11-10 19:52:37 +0100
committertv <tv@krebsco.de>2018-11-10 19:52:37 +0100
commit5ea1c2fcbb5756ef99d5fade8a7cd9e33b04a0c6 (patch)
treef6edbd9d1ff68773f413065a1f1c5dd71150be1a /makefu/2configs/backup.nix
parent9a801fa642a60a2c46240670b4e3ad66ea77d995 (diff)
parent05b288604e7e653efb6035b9953aa849e6e6bc19 (diff)
Merge remote-tracking branch 'prism/master'
Diffstat (limited to 'makefu/2configs/backup.nix')
-rw-r--r--makefu/2configs/backup.nix52
1 files changed, 0 insertions, 52 deletions
diff --git a/makefu/2configs/backup.nix b/makefu/2configs/backup.nix
deleted file mode 100644
index a4d02af6b..000000000
--- a/makefu/2configs/backup.nix
+++ /dev/null
@@ -1,52 +0,0 @@
-{ config, lib, pkgs, ... }:
-with import <stockholm/lib>;
-let
- # preparation:
- # mkdir -p defaultBackupDir/host.name/src
- # as root on omo:
- # ssh-copy-id root@src
- startAt = "0,6,12,18:00";
- defaultBackupServer = config.krebs.hosts.omo;
- defaultBackupDir = "/home/backup";
- defaultPull = host: src: {
- method = "pull";
- src = {
- inherit host;
- path = src;
- };
- dst = {
- host = defaultBackupServer;
- path = "${defaultBackupDir}/${host.name}${src}";
- };
- startAt = "0,6,12,18:00";
- snapshots = {
- 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"; };
- };
- };
-in {
- krebs.backup.plans = {
- # wry-to-omo_root = defaultPull config.krebs.hosts.wry "/";
- gum-to-omo_root = defaultPull config.krebs.hosts.gum "/";
- gum-dl-to-omo_external = (defaultPull config.krebs.hosts.gum "/var/download" )//
- {
- dst.path = "/media/cryptX/backup/gum/var-download";
- dst.host = defaultBackupServer;
- startAt = "19:00";
- };
- gum-owncloud-to-omo_external = (defaultPull config.krebs.hosts.gum "/var/www/o.euer.krebsco.de" )//
- {
- dst.path = "/media/cryptX/backup/gum/var-www-o.euer.krebsco.de";
- dst.host = defaultBackupServer;
-
- startAt = "05:00";
- };
- # wolf-to-omo_root = defaultPull config.krebs.hosts.wolf "/";
- };
- environment.systemPackages = [
- pkgs.borgbackup
- ];
-}