From 98855774e3e5b99d79f96a84386b5553fa3dff7c Mon Sep 17 00:00:00 2001 From: VC Date: Sun, 27 Oct 2024 17:32:10 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8:=20introduce=20block=5Fsize=20for=20g?= =?UTF-8?q?arage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inventory/group_vars/garage_bck_cluster.yml | 2 ++ roles/garage/defaults/main.yml | 2 ++ roles/garage/templates/garage.toml.j2 | 2 ++ 3 files changed, 6 insertions(+) create mode 100644 roles/garage/defaults/main.yml diff --git a/inventory/group_vars/garage_bck_cluster.yml b/inventory/group_vars/garage_bck_cluster.yml index b08cf1c..b9cbcb4 100644 --- a/inventory/group_vars/garage_bck_cluster.yml +++ b/inventory/group_vars/garage_bck_cluster.yml @@ -23,3 +23,5 @@ garage_admin_token: !vault | 31306266336137346638 garage_root_domain: ".backup.mateu.be" +# Makes the Garage block size corresponds to the Restic block size +garage_block_size: 16M diff --git a/roles/garage/defaults/main.yml b/roles/garage/defaults/main.yml new file mode 100644 index 0000000..9925320 --- /dev/null +++ b/roles/garage/defaults/main.yml @@ -0,0 +1,2 @@ +--- +garage_block_size: 1M diff --git a/roles/garage/templates/garage.toml.j2 b/roles/garage/templates/garage.toml.j2 index 4622e9c..3fc7be1 100644 --- a/roles/garage/templates/garage.toml.j2 +++ b/roles/garage/templates/garage.toml.j2 @@ -8,6 +8,8 @@ metadata_dir = "/var/lib/garage/meta" data_dir = "/var/lib/garage/data" db_engine = "lmdb" +block_size = "{{ garage_block_size }}" + replication_mode = "{{ garage_replication_mode }}" compression_level = 2