Add path an tag arguments to mysql restic client

This commit is contained in:
Andreas Zweili 2022-11-02 23:44:54 +01:00
parent b8c47163c7
commit 1724f95d34
2 changed files with 12 additions and 2 deletions

View File

@ -1,4 +1,12 @@
{ hostname, inputs, custom, pkgs, time, ... }:
{ hostname
, inputs
, custom
, path ? "/home/${custom.username}"
, pkgs
, tag ? "home-dir"
, time
, ...
}:
{
imports = [
"${inputs.self}/modules/telegram-notifications"
@ -24,7 +32,7 @@
script = ''
${pkgs.restic}/bin/restic backup \
--exclude-file=${inputs.self}/modules/restic/excludes.txt \
--tag home-dir /home/${custom.username}
--tag ${tag} ${path}
${pkgs.mariadb}/bin/mysqldump --single-transaction --all-databases | \
${pkgs.restic}/bin/restic backup \

View File

@ -12,6 +12,8 @@ in
inherit domain inputs;
})
(import "${inputs.self}/modules/restic-server-mysql-client" {
path = "/var/lib/ttrss";
tag = "ttrss";
time = "23:00"; inherit custom hostname inputs pkgs;
})
"${inputs.self}/modules/mariadb"