From 54c5cfb2405afae3a9af5d7cc7fbd8965ebb9dfe Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Tue, 13 Dec 2022 09:59:31 +0100 Subject: [PATCH] restic/system: Enable compression Fixes #66. --- machines/renge/configuration.nix | 1 + modules/restic/system.nix | 2 ++ 2 files changed, 3 insertions(+) diff --git a/machines/renge/configuration.nix b/machines/renge/configuration.nix index 2ba11b9..b18a5e4 100644 --- a/machines/renge/configuration.nix +++ b/machines/renge/configuration.nix @@ -62,6 +62,7 @@ enable = true; startAt = [ ]; # triggered by restic system backup location = "/var/lib/postgresql-backup"; + compression = "none"; }; systemd.services.restic-backups-system = { after = [ "postgresqlBackup.service" ]; diff --git a/modules/restic/system.nix b/modules/restic/system.nix index 90be5be..87b730c 100644 --- a/modules/restic/system.nix +++ b/modules/restic/system.nix @@ -87,6 +87,7 @@ in "/var" ] ++ cfg.extraPaths; extraBackupArgs = [ + "--compression auto" "--exclude-caches" "--exclude-file=${excludesFile}" "--tag system" @@ -113,6 +114,7 @@ in "sftp.command='ssh -i ${config.sops.secrets.restic-ssh-key.path} -p ${toString sftpPort} ${sftpTarget} -s sftp'" ]; pruneOpts = [ + "--compression auto" "--keep-daily 7" "--keep-monthly 12" "--keep-weekly 5"