aboutsummaryrefslogtreecommitdiff
path: root/modules/private
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2020-08-08 15:57:53 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2020-08-08 15:57:53 +0200
commit546864bc7d2d452803baafcb5d30438924e1d223 (patch)
tree60bdfa1be249c383a697ecd00567f8dc4f0deb38 /modules/private
parentf831eb7e4b04fe788883c5f630c70020895ce7fe (diff)
downloadNix-546864bc7d2d452803baafcb5d30438924e1d223.tar.gz
Nix-546864bc7d2d452803baafcb5d30438924e1d223.tar.zst
Nix-546864bc7d2d452803baafcb5d30438924e1d223.zip
Add other backup profiles to ovh backend
Diffstat (limited to 'modules/private')
-rw-r--r--modules/private/buildbot/default.nix1
-rw-r--r--modules/private/ftp.nix1
-rw-r--r--modules/private/gitolite/default.nix1
-rw-r--r--modules/private/mail/default.nix1
-rwxr-xr-xmodules/private/monitoring/plugins/check_backup_age4
-rw-r--r--modules/private/websites/tools/diaspora/default.nix1
-rw-r--r--modules/private/websites/tools/tools/dokuwiki.nix1
-rw-r--r--modules/private/websites/tools/tools/wallabag.nix1
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
26 config = lib.mkIf config.myServices.buildbot.enable { 26 config = lib.mkIf config.myServices.buildbot.enable {
27 services.duplyBackup.profiles.buildbot = { 27 services.duplyBackup.profiles.buildbot = {
28 rootDir = varDir; 28 rootDir = varDir;
29 remotes = [ "eriomem" "ovh" ];
29 }; 30 };
30 ids.uids.buildbot = config.myEnv.buildbot.user.uid; 31 ids.uids.buildbot = config.myEnv.buildbot.user.uid;
31 ids.gids.buildbot = config.myEnv.buildbot.user.gid; 32 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
16 config = lib.mkIf config.services.pure-ftpd.enable { 16 config = lib.mkIf config.services.pure-ftpd.enable {
17 services.duplyBackup.profiles.ftp = { 17 services.duplyBackup.profiles.ftp = {
18 rootDir = "/var/lib/ftp"; 18 rootDir = "/var/lib/ftp";
19 remotes = [ "eriomem" "ovh" ];
19 }; 20 };
20 security.acme.certs."ftp" = config.myServices.certificates.certConfig // { 21 security.acme.certs."ftp" = config.myServices.certificates.certConfig // {
21 domain = "eldiron.immae.eu"; 22 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 {
17 }]; 17 }];
18 services.duplyBackup.profiles.gitolite = { 18 services.duplyBackup.profiles.gitolite = {
19 rootDir = cfg.gitoliteDir; 19 rootDir = cfg.gitoliteDir;
20 remotes = [ "eriomem" "ovh" ];
20 }; 21 };
21 networking.firewall.allowedTCPPorts = [ 9418 ]; 22 networking.firewall.allowedTCPPorts = [ 9418 ];
22 23
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 @@
37 }; 37 };
38 services.duplyBackup.profiles = { 38 services.duplyBackup.profiles = {
39 mail = { 39 mail = {
40 remotes = [ "eriomem" "ovh" ];
40 rootDir = "/var/lib"; 41 rootDir = "/var/lib";
41 excludeFile = lib.mkAfter '' 42 excludeFile = lib.mkAfter ''
42 + /var/lib/vhost 43 + /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
17 17
18output=$(echo "$output" | grep -v "^\.") 18output=$(echo "$output" | grep -v "^\.")
19 19
20last_full=$(parse_date $(echo "$output" | grep "^ full " | cut -d' ' -f3 | sort | tail -n1)) 20last_full=$(parse_date "$(echo "$output" | grep "^ full " | cut -d' ' -f3 | sort | tail -n1)")
21last_bkp=$(parse_date $(echo "$output" | grep -E "^ (full|inc) " | cut -d' ' -f3 | sort | tail -n1)) 21last_bkp=$(parse_date "$(echo "$output" | grep -E "^ (full|inc) " | cut -d' ' -f3 | sort | tail -n1)")
22orphaned_sets=$(echo "$output" | grep "^orphaned-sets-num" | cut -d' ' -f2) 22orphaned_sets=$(echo "$output" | grep "^orphaned-sets-num" | cut -d' ' -f2)
23incomplete_sets=$(echo "$output" | grep "^incomplete-sets-num" | cut -d' ' -f2) 23incomplete_sets=$(echo "$output" | grep "^incomplete-sets-num" | cut -d' ' -f2)
24 24
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 {
12 config = lib.mkIf cfg.enable { 12 config = lib.mkIf cfg.enable {
13 services.duplyBackup.profiles.diaspora = { 13 services.duplyBackup.profiles.diaspora = {
14 rootDir = dcfg.dataDir; 14 rootDir = dcfg.dataDir;
15 remotes = [ "eriomem" "ovh" ];
15 }; 16 };
16 users.users.diaspora.extraGroups = [ "keys" ]; 17 users.users.diaspora.extraGroups = [ "keys" ];
17 18
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 @@
2rec { 2rec {
3 backups = { 3 backups = {
4 rootDir = varDir; 4 rootDir = varDir;
5 remotes = [ "eriomem" "ovh" ];
5 }; 6 };
6 varDir = "/var/lib/dokuwiki"; 7 varDir = "/var/lib/dokuwiki";
7 activationScript = { 8 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 @@
2rec { 2rec {
3 backups = { 3 backups = {
4 rootDir = varDir; 4 rootDir = varDir;
5 remotes = [ "eriomem" "ovh" ];
5 }; 6 };
6 varDir = "/var/lib/wallabag"; 7 varDir = "/var/lib/wallabag";
7 keys = [{ 8 keys = [{