services: postgresql-backup: add current to backup
This commit is contained in:
parent
7a3588e17f
commit
8fa9e1ce1a
|
@ -11,6 +11,17 @@ in
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
services.postgresqlBackup = {
|
services.postgresqlBackup = {
|
||||||
enable = true;
|
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")
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue