From 46ec4cc2e7af4197dd58eba4a340d80780d3a140 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Mon, 28 Oct 2024 16:55:10 +0100 Subject: [PATCH] bundles/postgresql: please also always do dumps --- bundles/postgresql/items.py | 6 +----- bundles/postgresql/metadata.py | 3 +-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/bundles/postgresql/items.py b/bundles/postgresql/items.py index f9cdc46..0a1b09f 100644 --- a/bundles/postgresql/items.py +++ b/bundles/postgresql/items.py @@ -57,7 +57,7 @@ files = { }, } -if node.has_bundle('backup-client') and not node.has_bundle('zfs'): +if node.has_bundle('backup-client'): files['/etc/backup-pre-hooks.d/90-postgresql-dump-all'] = { 'source': 'backup-pre-hook', 'content_type': 'mako', @@ -67,10 +67,6 @@ if node.has_bundle('backup-client') and not node.has_bundle('zfs'): 'mode': '0700', } directories['/var/tmp/postgresdumps'] = {} -else: - files['/var/tmp/postgresdumps'] = { - 'delete': True, - } postgres_roles = { 'root': { diff --git a/bundles/postgresql/metadata.py b/bundles/postgresql/metadata.py index e69a117..b624bae 100644 --- a/bundles/postgresql/metadata.py +++ b/bundles/postgresql/metadata.py @@ -11,6 +11,7 @@ defaults = { 'backups': { 'paths': { '/var/lib/postgresql', + '/var/tmp/postgresdumps', }, }, 'bash_functions': { @@ -74,8 +75,6 @@ if node.has_bundle('zfs'): }, }, } -else: - defaults['backups']['paths'].add('/var/tmp/postgresdumps') @metadata_reactor.provides(