build03, web02: backup postgresql
This commit is contained in:
parent
2aa87e5b0f
commit
8ce44ebf9a
5 changed files with 59 additions and 9 deletions
hosts/web02
31
hosts/web02/postgresql.nix
Normal file
31
hosts/web02/postgresql.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
config,
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
inputs.self.nixosModules.backup
|
||||
];
|
||||
|
||||
services.postgresqlBackup = {
|
||||
enable = true;
|
||||
compression = "none";
|
||||
startAt = "daily";
|
||||
};
|
||||
|
||||
nixCommunity.backup = [
|
||||
{
|
||||
name = "postgresql";
|
||||
after = [ config.systemd.services.postgresqlBackup.name ];
|
||||
paths = [ config.services.postgresqlBackup.location ];
|
||||
startAt = "daily";
|
||||
}
|
||||
];
|
||||
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
package = pkgs.postgresql_17;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue