From 4ee523ed69a1ca5ab33dfd9c9423773d1a7d3b90 Mon Sep 17 00:00:00 2001 From: Mathijsvw <31502247+MathijsVanWilligen@users.noreply.github.com> Date: Wed, 14 Dec 2022 20:56:40 +0100 Subject: [PATCH] Added pg_dump_suffix doc and crd property (#1006) * Added pg_dump_suffix crd property Signed-off-by: Mathijs van Willigen --- config/crd/bases/awx.ansible.com_awxbackups.yaml | 3 +++ roles/backup/README.md | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/config/crd/bases/awx.ansible.com_awxbackups.yaml b/config/crd/bases/awx.ansible.com_awxbackups.yaml index 03625de4..a7c88ff4 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 diff --git a/roles/backup/README.md b/roles/backup/README.md index d4ab7bd4..9d130a2f 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 ----------------