fix postgres backup
This commit is contained in:
parent
8f36dda4e8
commit
3b4f25ead8
@ -119,8 +119,7 @@ in
|
||||
"/var/lib/gitea"
|
||||
"/var/lib/grafana"
|
||||
"/var/lib/jackett"
|
||||
"/var/lib/matrix-synapse"
|
||||
"/var/lib/postgresql/.zfs/snapshot/borgsnap"
|
||||
"/mnt/borgsnap/postgresql"
|
||||
"/var/lib/radarr"
|
||||
"/var/lib/sonarr"
|
||||
"/var/lib/transmission"
|
||||
@ -130,6 +129,7 @@ in
|
||||
"/mnt/paul-home/paul"
|
||||
"/var/sieve"
|
||||
"/var/vmail"
|
||||
"/mnt/backup_loutre/amandoleen"
|
||||
];
|
||||
exclude = [
|
||||
"/var/lib/radarr/.config/Radarr/radarr.db-wal"
|
||||
@ -147,9 +147,14 @@ in
|
||||
weekly = 4;
|
||||
monthly = 12;
|
||||
};
|
||||
preHook = "${pkgs.zfs}/bin/zfs snapshot loutrepool/var/postgresql@borgsnap";
|
||||
preHook = ''
|
||||
${pkgs.zfs}/bin/zfs snapshot loutrepool/var/postgresql@borgsnap
|
||||
mkdir -p /mnt/borgsnap/postgresql
|
||||
${config.security.wrapperDir}/mount -t zfs loutrepool/var/postgresql@borgsnap /mnt/borgsnap/postgresql
|
||||
'';
|
||||
readWritePaths = [ "/var/lib/postfix/queue/maildrop" ];
|
||||
postHook = ''
|
||||
${config.security.wrapperDir}/umount /mnt/borgsnap/postgresql
|
||||
${pkgs.zfs}/bin/zfs destroy loutrepool/var/postgresql@borgsnap
|
||||
'';
|
||||
};
|
||||
@ -537,6 +542,8 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services."borgbackup-job-loutre".serviceConfig.TemporaryFileSystem = ["/mnt/borgsnap"];
|
||||
|
||||
dogetipbot-telegram.enable = true;
|
||||
|
||||
ipmihddtemp.enable = true;
|
||||
|
Loading…
Reference in New Issue
Block a user