borg-backup: setup paths in respective services

This commit is contained in:
Antoine Martin 2021-01-31 13:00:04 +01:00
parent 8ed0f14f74
commit 41769615f0
4 changed files with 19 additions and 5 deletions

View file

@ -80,11 +80,6 @@
borg-backup = { borg-backup = {
enable = true; enable = true;
repo = (lib.removeSuffix "\n" (builtins.readFile ./borg-backup-repo)); repo = (lib.removeSuffix "\n" (builtins.readFile ./borg-backup-repo));
paths = [
"/var/lib/matrix-synapse"
"/var/backup/postgresql"
];
exclude = [];
}; };
miniflux = { miniflux = {

View file

@ -93,5 +93,11 @@ in {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
bitwarden_rs-vault bitwarden_rs-vault
]; ];
my.services.borg-backup = mkIf cfg.enable {
paths = [ "/var/lib/bitwarden_rs" ];
exclude = [ "/var/lib/bitwarden_rs/icon_cache" ];
};
}; };
} }

View file

@ -171,5 +171,9 @@ in {
clientPort.public clientPort.public
federationPort.public federationPort.public
]; ];
my.services.borg-backup = mkIf cfg.enable {
paths = [ "/var/lib/matrix-synapse" ];
};
}; };
} }

View file

@ -15,5 +15,14 @@ in {
# Borg backup starts at midnight so create DB dump just before # Borg backup starts at midnight so create DB dump just before
startAt = "*-*-* 23:30:00"; startAt = "*-*-* 23:30:00";
}; };
my.services.borg-backup = mkIf cfg.enable {
paths = [ "/var/backup/postgresql" ];
# no need to store previously backed up files, as borg does the snapshoting
# for us
exclude = [ "/var/backup/postgresql/*.prev.sql.gz" ];
};
}; };
} }