From 571e05c2e3d7d37c94f765e4278e72974774bcba Mon Sep 17 00:00:00 2001 From: Daniel Frank Date: Sat, 15 Jun 2019 11:32:15 +0200 Subject: [PATCH] borgbackup: configure backup of emails --- borgbackup.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/borgbackup.nix b/borgbackup.nix index 521f8c3..1e6f473 100644 --- a/borgbackup.nix +++ b/borgbackup.nix @@ -41,4 +41,23 @@ in compression = "auto,lz4"; startAt = "hourly"; }; + services.borgbackup.jobs.maildata = { + readWritePaths = [ "/var/lib/borgbackup" ]; + paths = "/srv/vmail"; + exclude = [ ]; + repo = "mail2@host01.hamburg.freifunk.net:maildata"; + prune.keep = { + daily = 7; + weekly = 2; + }; + encryption = { + mode = "repokey"; + passCommand = "${borgPassCommand}"; + }; + environment = { + BORG_RSH = "${pkgs.openssh}/bin/ssh -i /var/lib/borgbackup/sshkey"; + }; + compression = "auto,lz4"; + startAt = "daily"; + }; }