Skip to content

Add use_db_compression option for backup database dumps#325

Open
rooftopcellist wants to merge 1 commit intoansible:mainfrom
rooftopcellist:feat/db-compression
Open

Add use_db_compression option for backup database dumps#325
rooftopcellist wants to merge 1 commit intoansible:mainfrom
rooftopcellist:feat/db-compression

Conversation

@rooftopcellist
Copy link
Member

@rooftopcellist rooftopcellist commented Mar 5, 2026

Summary

  • Add use_db_compression boolean field (default: false) to EDABackup CRD and backup role defaults
  • When enabled, pg_dump uses -Z 9 for built-in compression, producing eda.db.gz instead of eda.db
  • Restore auto-detects compressed (.db.gz) or uncompressed (.db) backup files for full backward compatibility

Part of AAP-38759 (OCP Operator DB Compression).

Test plan

  • Create EDABackup with default use_db_compression: false — verify produces eda.db
  • Create EDABackup with use_db_compression: true — verify produces eda.db.gz
  • Restore from an existing eda.db backup (old format) — verify succeeds
  • Restore from a eda.db.gz backup (new format) — verify succeeds

@rooftopcellist rooftopcellist force-pushed the feat/db-compression branch 2 times, most recently from 75891b2 to 0399209 Compare March 5, 2026 04:22
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
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 5, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant