services: postgresql-backup: add current to backup

This commit is contained in:
Bruno BELANYI 2021-02-07 12:30:23 +00:00
parent 7a3588e17f
commit 8fa9e1ce1a

View file

@ -11,6 +11,17 @@ in
config = lib.mkIf cfg.enable {
services.postgresqlBackup = {
enable = true;
location = "/var/backup/postgresql";
};
my.services.backup = {
paths = [
config.services.postgresqlBackup.location
];
# No need to store previous backups thanks to `restic`
exclude = [
(config.services.postgresqlBackup.location + "/*.prev.sql.gz")
];
};
};
}