From ce851f59c67300405dd6e477fc7cdd0ed2132c3a Mon Sep 17 00:00:00 2001 From: Ruakij Date: Wed, 4 Nov 2026 06:59:47 +0000 Subject: [PATCH] kopia_backup: set zstd as the global compression policy on every run --- kopia_backup/templates/kopia-backup.j2 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kopia_backup/templates/kopia-backup.j2 b/kopia_backup/templates/kopia-backup.j2 index 43b1cd9..d17bbbe 100644 --- a/kopia_backup/templates/kopia-backup.j2 +++ b/kopia_backup/templates/kopia-backup.j2 @@ -35,6 +35,10 @@ dump() { # file, container, command run inside the container dump {{ d.file | quote }} {{ d.container | quote }} {{ d.command | quote }} {% endfor %} {% endif %} + +# Global policy of the repository, inherited by every source; the repository is shared by all hosts of the bucket +kopia policy set --global --compression=zstd >/dev/null 2>&1 || + { echo "setting the global compression failed" >&2; failed=1; } {% set ignores = kopia_backup.ignore | dict2items | rejectattr('value', 'none') | list %} {% if ignores %}