borgbackup: configure backup of emails

This commit is contained in:
Daniel Frank 2019-06-15 11:32:15 +02:00
parent 9d59b4293c
commit 571e05c2e3
Signed by: tokudan
GPG key ID: 063CCCAD04182D32

View file

@ -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";
};
}