awx-operator icon indicating copy to clipboard operation
awx-operator copied to clipboard

Add ability to exclude job event and job data from backup

Open kdelee opened this issue 2 years ago • 1 comments

Please confirm the following

  • [X] I agree to follow this project's code of conduct.
  • [X] I have checked the current issues for duplicates.
  • [X] I understand that AWX Operator is open source software provided for free and that I might not receive a timely response.

Feature Summary

Sometimes for users with lots of data, they are told they can manually dump the data and pass --exclude-table-data '*.main_jobevent' and/or --exclude-table-data '*.main_job'

It would be useful if we could do that for the AWXBackup in https://github.com/ansible/awx-operator/blob/e966e9299f89e77e893537eb6af184301b570dd5/roles/backup/tasks/postgres.yml#L87-L94

kdelee avatar Jun 22 '22 20:06 kdelee

Adding an optional 'pg_dump_command_option' variable could provide a generic fix? Like:

     pgdump: >- 
       pg_dump --clean --create 
       -h {{ resolvable_db_host }} 
       -U {{ awx_postgres_user }} 
       -d {{ awx_postgres_database }} 
       -p {{ awx_postgres_port }} 
       -F custom 
       {{ pg_dump_command_option | default() }}

sdktr avatar Jul 07 '22 21:07 sdktr