From bc113c5d69d90b9bad0c26dc7b7bc61e74d1c1a8 Mon Sep 17 00:00:00 2001 From: Daniel Frank Date: Fri, 15 Nov 2019 19:35:24 +0100 Subject: [PATCH] borgbackup: add gitolite to the backup --- borgbackup.nix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/borgbackup.nix b/borgbackup.nix index 9329492..3b77297 100644 --- a/borgbackup.nix +++ b/borgbackup.nix @@ -64,4 +64,25 @@ in extraArgs = "--info"; extraCreateArgs = "--stats"; }; + services.borgbackup.jobs.gitolite = { + readWritePaths = [ "/var/lib/borgbackup" ]; + paths = "/srv/gitolite"; + exclude = [ ]; + repo = "mail2@host01.hamburg.freifunk.net:gitolite"; + 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"; + extraArgs = "--info"; + extraCreateArgs = "--stats"; + }; }