43 lines
1 KiB
Nix
43 lines
1 KiB
Nix
{
|
|
lib,
|
|
config,
|
|
name,
|
|
# meta,
|
|
...
|
|
}: {
|
|
fileSystems."/mnt/pgdumps" = {
|
|
device = "192.168.1.226:/volume1/database_backups/${name}";
|
|
fsType = "nfs4";
|
|
options = ["x-systemd.automount" "noatime" "_netdev"];
|
|
};
|
|
services.postgresqlBackup = {
|
|
enable = true;
|
|
# We trigger this through restic
|
|
startAt = [];
|
|
# startAt = "*-*-* 01:15:00";
|
|
compression = "zstd";
|
|
databases = [
|
|
"authelia-procopius"
|
|
"lldap"
|
|
];
|
|
};
|
|
|
|
# services.restic.backups.b2 = {
|
|
# environmentFile = config.sops.templates.restic_floofs_env.path;
|
|
# repositoryFile = config.sops.secrets.b2_floofs_server_repository.path;
|
|
# passwordFile = config.sops.secrets.b2_floofs_server_password.path;
|
|
|
|
# paths = ["/var/backup/postgresql"];
|
|
# initialize = true;
|
|
# pruneOpts = [
|
|
# "--keep-daily 7"
|
|
# "--keep-weekly 3"
|
|
# "--keep-monthly 3"
|
|
# ];
|
|
# timerConfig = {
|
|
# OnCalendar = "04:45";
|
|
# Persistent = true;
|
|
# };
|
|
# };
|
|
# systemd.services.restic-backups-b2.wants = ["postgresqlBackup.service"];
|
|
}
|