From 2def7bcac006fdd6ac106e2bed087bffdfdb0a9f Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Sun, 20 Sep 2020 22:54:59 +0200 Subject: [PATCH] mysql: add backup --- configs/workhorse/mysql.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/configs/workhorse/mysql.nix b/configs/workhorse/mysql.nix index d0f8391..9b965aa 100644 --- a/configs/workhorse/mysql.nix +++ b/configs/workhorse/mysql.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, ... }: { +{ pkgs, lib, config, ... }: { services.mysql = { enable = true; @@ -9,4 +9,16 @@ ''; }; + services.mysqlBackup = { + enable = true; + databases = [ + "property" + ]; + user = "root"; + }; + + backup.dirs = [ + config.services.mysqlBackup.location + ]; + }