From f766f8990d26298b66caace649a2d1fdb011405c Mon Sep 17 00:00:00 2001 From: Emile Date: Sun, 21 Jul 2024 17:56:02 +0200 Subject: (hedgedoc): restic backups --- nix/hosts/corrino/www/md.emile.space.nix | 35 ++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 11 deletions(-) (limited to 'nix/hosts/corrino/www/md.emile.space.nix') diff --git a/nix/hosts/corrino/www/md.emile.space.nix b/nix/hosts/corrino/www/md.emile.space.nix index ff91a7b..d7bdd00 100644 --- a/nix/hosts/corrino/www/md.emile.space.nix +++ b/nix/hosts/corrino/www/md.emile.space.nix @@ -96,16 +96,29 @@ in { }; # backups - services.restic.backups = { - storagebox = { - user = "u331921"; - repository = "stfp:u331921@u331921.your-storagebox-de:23/restic"; - initialize = true; # initializes the repo, don't set if you want manual control - passwordFile = config.age.secrets.restic_password.path; - paths = [ - "/var/lib/hedgedoc/" - ]; - }; - }; + services.restic.backups."hedgedoc" = { + user = "u331921"; + timerConfig = { + OnCalendar = "daily"; + Persistent = true; + }; + # repository = "stfp:u331921@u331921.your-storagebox-de:23/restic"; + repository = "/mnt/storagebox-bx11/backup/hedgedoc"; + initialize = true; # initializes the repo, don't set if you want manual control + passwordFile = config.age.secrets.restic_password.path; + paths = [ + "/var/lib/hedgedoc/" + ]; + pruneOpts = [ + "--keep-daily 7" + "--keep-weekly 5" + "--keep-monthly 12" + "--keep-yearly 75" + ]; + + # extraOpts = [ + # "sftp.command='ssh backup@192.168.1.100 -i /home/user/.ssh/id_rsa -s sftp'" + # ]; + }; } -- cgit 1.4.1