From 546864bc7d2d452803baafcb5d30438924e1d223 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Sat, 8 Aug 2020 15:57:53 +0200 Subject: Add other backup profiles to ovh backend --- modules/private/buildbot/default.nix | 1 + modules/private/ftp.nix | 1 + modules/private/gitolite/default.nix | 1 + modules/private/mail/default.nix | 1 + modules/private/monitoring/plugins/check_backup_age | 4 ++-- modules/private/websites/tools/diaspora/default.nix | 1 + modules/private/websites/tools/tools/dokuwiki.nix | 1 + modules/private/websites/tools/tools/wallabag.nix | 1 + 8 files changed, 9 insertions(+), 2 deletions(-) diff --git a/modules/private/buildbot/default.nix b/modules/private/buildbot/default.nix index c8ee48e..3dc6a04 100644 --- a/modules/private/buildbot/default.nix +++ b/modules/private/buildbot/default.nix @@ -26,6 +26,7 @@ in config = lib.mkIf config.myServices.buildbot.enable { services.duplyBackup.profiles.buildbot = { rootDir = varDir; + remotes = [ "eriomem" "ovh" ]; }; ids.uids.buildbot = config.myEnv.buildbot.user.uid; ids.gids.buildbot = config.myEnv.buildbot.user.gid; diff --git a/modules/private/ftp.nix b/modules/private/ftp.nix index 8ae4e65..233031a 100644 --- a/modules/private/ftp.nix +++ b/modules/private/ftp.nix @@ -16,6 +16,7 @@ in config = lib.mkIf config.services.pure-ftpd.enable { services.duplyBackup.profiles.ftp = { rootDir = "/var/lib/ftp"; + remotes = [ "eriomem" "ovh" ]; }; security.acme.certs."ftp" = config.myServices.certificates.certConfig // { domain = "eldiron.immae.eu"; diff --git a/modules/private/gitolite/default.nix b/modules/private/gitolite/default.nix index e8ccc7d..6b573e3 100644 --- a/modules/private/gitolite/default.nix +++ b/modules/private/gitolite/default.nix @@ -17,6 +17,7 @@ in { }]; services.duplyBackup.profiles.gitolite = { rootDir = cfg.gitoliteDir; + remotes = [ "eriomem" "ovh" ]; }; networking.firewall.allowedTCPPorts = [ 9418 ]; diff --git a/modules/private/mail/default.nix b/modules/private/mail/default.nix index 57fc75c..9e68cc9 100644 --- a/modules/private/mail/default.nix +++ b/modules/private/mail/default.nix @@ -37,6 +37,7 @@ }; services.duplyBackup.profiles = { mail = { + remotes = [ "eriomem" "ovh" ]; rootDir = "/var/lib"; excludeFile = lib.mkAfter '' + /var/lib/vhost diff --git a/modules/private/monitoring/plugins/check_backup_age b/modules/private/monitoring/plugins/check_backup_age index 4d03b82..d873bdc 100755 --- a/modules/private/monitoring/plugins/check_backup_age +++ b/modules/private/monitoring/plugins/check_backup_age @@ -17,8 +17,8 @@ output=$(duplicity collection-status --log-fd 2 "$BASE_URL$folder" 2>&1 > /dev/n output=$(echo "$output" | grep -v "^\.") -last_full=$(parse_date $(echo "$output" | grep "^ full " | cut -d' ' -f3 | sort | tail -n1)) -last_bkp=$(parse_date $(echo "$output" | grep -E "^ (full|inc) " | cut -d' ' -f3 | sort | tail -n1)) +last_full=$(parse_date "$(echo "$output" | grep "^ full " | cut -d' ' -f3 | sort | tail -n1)") +last_bkp=$(parse_date "$(echo "$output" | grep -E "^ (full|inc) " | cut -d' ' -f3 | sort | tail -n1)") orphaned_sets=$(echo "$output" | grep "^orphaned-sets-num" | cut -d' ' -f2) incomplete_sets=$(echo "$output" | grep "^incomplete-sets-num" | cut -d' ' -f2) diff --git a/modules/private/websites/tools/diaspora/default.nix b/modules/private/websites/tools/diaspora/default.nix index 4fe4115..5d2b19f 100644 --- a/modules/private/websites/tools/diaspora/default.nix +++ b/modules/private/websites/tools/diaspora/default.nix @@ -12,6 +12,7 @@ in { config = lib.mkIf cfg.enable { services.duplyBackup.profiles.diaspora = { rootDir = dcfg.dataDir; + remotes = [ "eriomem" "ovh" ]; }; users.users.diaspora.extraGroups = [ "keys" ]; diff --git a/modules/private/websites/tools/tools/dokuwiki.nix b/modules/private/websites/tools/tools/dokuwiki.nix index 5290a96..6175a68 100644 --- a/modules/private/websites/tools/tools/dokuwiki.nix +++ b/modules/private/websites/tools/tools/dokuwiki.nix @@ -2,6 +2,7 @@ rec { backups = { rootDir = varDir; + remotes = [ "eriomem" "ovh" ]; }; varDir = "/var/lib/dokuwiki"; activationScript = { diff --git a/modules/private/websites/tools/tools/wallabag.nix b/modules/private/websites/tools/tools/wallabag.nix index 00e2dc9..1cb0645 100644 --- a/modules/private/websites/tools/tools/wallabag.nix +++ b/modules/private/websites/tools/tools/wallabag.nix @@ -2,6 +2,7 @@ rec { backups = { rootDir = varDir; + remotes = [ "eriomem" "ovh" ]; }; varDir = "/var/lib/wallabag"; keys = [{ -- cgit v1.2.3