Add use_db_compression option for backup database dumps (#2106)

* Add use_db_compression option for backup database dumps

Enable optional pg_dump compression (-Z 9) via use_db_compression
boolean flag. Restore auto-detects compressed (.db.gz) or
uncompressed (.db) backups for backward compatibility.

Authored By: Christian M. Adams <chadams@redhat.com>
Assisted By: Claude

* Add CRD field, CSV descriptor, and restore auto-detection for use_db_compression

Authored By: Christian M. Adams <chadams@redhat.com>
Assisted By: Claude
This commit is contained in:
Christian Adams
2026-03-24 16:03:44 -04:00
committed by GitHub
parent 5697feea57
commit 60fc7d856c
4 changed files with 14 additions and 0 deletions

View File

@@ -42,6 +42,9 @@ backup_resource_requirements:
# Allow additional parameters to be added to the pg_dump backup command
pg_dump_suffix: ''
# Enable compression for database dumps (pg_dump -F custom built-in compression)
use_db_compression: true
# Labels defined on the resource, which should be propagated to child resources
additional_labels: []

View File

@@ -121,6 +121,7 @@
-d {{ awx_postgres_database }}
-p {{ awx_postgres_port }}
-F custom
{{ use_db_compression | bool | ternary('', '-Z 0') }}
{{ pg_dump_suffix }}
no_log: "{{ no_log }}"