services: backup postgres to restic

This commit is contained in:
Antoine Martin 2021-08-09 20:01:33 +02:00
parent a763e0549f
commit 0c538fbf86

View file

@ -12,11 +12,11 @@ in {
config = mkIf cfg.enable {
services.postgresqlBackup = {
enable = true;
# Borg backup starts at midnight so create DB dump just before
# Restic backup starts at midnight so create DB dump just before
startAt = "*-*-* 23:30:00";
};
my.services.borg-backup = mkIf cfg.enable {
my.services.restic-backup = mkIf cfg.enable {
paths = [ "/var/backup/postgresql" ];
# no need to store previously backed up files, as borg does the snapshoting