restic/system: Enable compression

Fixes #66.
This commit is contained in:
Simon Bruder 2022-12-13 09:59:31 +01:00
parent 73c6fe8195
commit 54c5cfb240
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC
2 changed files with 3 additions and 0 deletions

View file

@ -62,6 +62,7 @@
enable = true; enable = true;
startAt = [ ]; # triggered by restic system backup startAt = [ ]; # triggered by restic system backup
location = "/var/lib/postgresql-backup"; location = "/var/lib/postgresql-backup";
compression = "none";
}; };
systemd.services.restic-backups-system = { systemd.services.restic-backups-system = {
after = [ "postgresqlBackup.service" ]; after = [ "postgresqlBackup.service" ];

View file

@ -87,6 +87,7 @@ in
"/var" "/var"
] ++ cfg.extraPaths; ] ++ cfg.extraPaths;
extraBackupArgs = [ extraBackupArgs = [
"--compression auto"
"--exclude-caches" "--exclude-caches"
"--exclude-file=${excludesFile}" "--exclude-file=${excludesFile}"
"--tag system" "--tag system"
@ -113,6 +114,7 @@ in
"sftp.command='ssh -i ${config.sops.secrets.restic-ssh-key.path} -p ${toString sftpPort} ${sftpTarget} -s sftp'" "sftp.command='ssh -i ${config.sops.secrets.restic-ssh-key.path} -p ${toString sftpPort} ${sftpTarget} -s sftp'"
]; ];
pruneOpts = [ pruneOpts = [
"--compression auto"
"--keep-daily 7" "--keep-daily 7"
"--keep-monthly 12" "--keep-monthly 12"
"--keep-weekly 5" "--keep-weekly 5"