From 0a8f858ffc23fcd0440831a6129df889acea52cd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Th=C3=A9o=20-=20Le=20Filament?= <theo@le-filament.com>
Date: Mon, 28 Oct 2024 10:56:40 +0100
Subject: [PATCH] fix: use same version as server for PostgreSQL backup client

---
 templates/backup.yaml.j2 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/templates/backup.yaml.j2 b/templates/backup.yaml.j2
index 60f43b7..ae2d395 100644
--- a/templates/backup.yaml.j2
+++ b/templates/backup.yaml.j2
@@ -4,6 +4,7 @@ services:
         image: ghcr.io/tecnativa/docker-duplicity-postgres:master
         hostname: {{ inventory_hostname_short | lower | regex_replace('_','') }}-{{ template_odoo_instance.key }}
         environment:
+            DB_VERSION: "{{ [template_odoo_instance_setup.postgres_version | split('.') | first | int, 10] | max }}"
             DST: "swift://{{ template_odoo_instance.key }}_{{ inventory_hostname | lower }}"
             PGDATABASE: "{{ template_odoo_instance.value.db }}"
             PGUSER: "{{ template_odoo_instance.value.db_user }}"
-- 
GitLab