2024-10-03 08:34:20 +02:00
|
|
|
{ pkgs, config, ... }:
|
|
|
|
{
|
|
|
|
services.barman = {
|
|
|
|
enable = true;
|
|
|
|
package = (
|
|
|
|
pkgs.barman.overrideAttrs (prevAttrs: {
|
|
|
|
propagatedBuildInputs = prevAttrs.propagatedBuildInputs ++ [ pkgs.python3Packages.distutils ];
|
|
|
|
})
|
|
|
|
);
|
|
|
|
|
|
|
|
settings = {
|
|
|
|
barman = {
|
|
|
|
# log_file = "/var/log/barman/barman.log";
|
|
|
|
configuration_files_directory = "/etc/barman.d";
|
|
|
|
create_slot = "auto";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
servers = {
|
|
|
|
ha = {
|
|
|
|
description = "Home Assistant database";
|
|
|
|
conninfo = "host=10.0.0.254 user=postgres dbname=homeassistant passfile=${config.sops.secrets.barman-passwords.path}";
|
|
|
|
wal_streaming_conninfo = "host=10.0.0.254 user=postgres dbname=homeassistant passfile=${config.sops.secrets.barman-passwords.path}";
|
|
|
|
streaming_archiver = true;
|
|
|
|
backup_method = "postgres";
|
|
|
|
slot_name = "barman";
|
2024-10-10 08:41:09 +02:00
|
|
|
bandwidth_limit = 0;
|
|
|
|
last_backup_maximum_age = "3 DAYS";
|
|
|
|
minimum_redundancy = 3;
|
2024-10-03 08:34:20 +02:00
|
|
|
retention_policy = "RECOVERY WINDOW OF 4 WEEKS";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# passwordsFile = config.sops.secrets.barman-passwords.path;
|
|
|
|
};
|
|
|
|
}
|