diff options
author | Emile <git@emile.space> | 2024-07-21 17:56:02 +0200 |
---|---|---|
committer | Emile <git@emile.space> | 2024-07-21 17:56:02 +0200 |
commit | f766f8990d26298b66caace649a2d1fdb011405c (patch) | |
tree | a031f68ab8672d5ea60e6ba374ff54d756e4d23e /nix/hosts/corrino | |
parent | 8f08fede5ed5e39e774012a46dd0796193daf432 (diff) |
(hedgedoc): restic backups
Diffstat (limited to 'nix/hosts/corrino')
-rw-r--r-- | nix/hosts/corrino/www/md.emile.space.nix | 35 |
1 files changed, 24 insertions, 11 deletions
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'" + # ]; + }; } |