From 2e55f5728264ea4d2e03e9e52ba1456baa710ca3 Mon Sep 17 00:00:00 2001 From: Mathijs van Willigen Date: Wed, 5 Oct 2022 16:50:45 +0200 Subject: [PATCH 1/2] Added pg_dump_suffix crd property Signed-off-by: Mathijs van Willigen --- config/crd/bases/awx.ansible.com_awxbackups.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/crd/bases/awx.ansible.com_awxbackups.yaml b/config/crd/bases/awx.ansible.com_awxbackups.yaml index 03625de41..a7c88ff4b 100644 --- a/config/crd/bases/awx.ansible.com_awxbackups.yaml +++ b/config/crd/bases/awx.ansible.com_awxbackups.yaml @@ -78,6 +78,9 @@ spec: clean_backup_on_delete: description: Flag to indicate if backup should be deleted on PVC if AWXBackup object is deleted type: boolean + pg_dump_suffix: + description: Additional parameters for the pg_dump command + type: string postgres_label_selector: description: Label selector used to identify postgres pod for backing up data type: string From 2fb5eff6d200049987d31cc50a7b5dede3f37bcf Mon Sep 17 00:00:00 2001 From: Mathijs van Willigen Date: Tue, 2 Aug 2022 08:17:45 +0200 Subject: [PATCH 2/2] Added pg_dump_suffix example inside role docs Signed-off-by: Mathijs van Willigen --- roles/backup/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/roles/backup/README.md b/roles/backup/README.md index d4ab7bd4f..9d130a2ff 100644 --- a/roles/backup/README.md +++ b/roles/backup/README.md @@ -93,6 +93,12 @@ backup_resource_requirements: memory: "32Mi" ``` +To customize the pg_dump command that will be executed on a backup use the `pg_dump_suffix` variable. This variable will append your provided pg_dump parameters to the end of the 'standard' command. For example to exclude the data from 'main_jobevent' and 'main_job' to decrease the size of the backup use: + +``` +pg_dump_suffix: "--exclude-table-data 'main_jobevent*' --exclude-table-data 'main_job'" +``` + Testing ----------------