From 9f6a78629aad1d22dc8b928860fd05eb40f07352 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Thu, 5 Dec 2019 00:51:45 +0100 Subject: Add mysql replication --- modules/private/system/backup-2.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'modules/private/system') diff --git a/modules/private/system/backup-2.nix b/modules/private/system/backup-2.nix index 3120a57..0e94a1a 100644 --- a/modules/private/system/backup-2.nix +++ b/modules/private/system/backup-2.nix @@ -61,6 +61,22 @@ }; }; }; + mariadb = { + enable = true; + base = "/backup2"; + hosts = { + eldiron = { + serverId = 2; + # mysql resolves "backup-2" host and checks the ip, but uses /etc/hosts which only contains ip4 + host = myconfig.env.servers.eldiron.ips.main.ip4; + port = "3306"; + user = "backup-2"; + password = myconfig.env.ldap.backup-2.password; + dumpUser = "root"; + dumpPassword = myconfig.env.databases.mysql.systemUsers.root; + }; + }; + }; }; # This value determines the NixOS release with which your system is -- cgit v1.2.3