Clean AWX Postgres

Is there a way to clean the AWX postgres backend?

If you are looking to wipe out the storage for the behind the awx postgres than you can just delete the persistent volume claim

Hey @TheRealHaoLiu I appreciate the response. I guess some more information on my end would be helpful :D. I have an AWX deployment that occasionally goes offline because the postgres DB volumes fill up. Last time I expanded the volume from 75 to 200 GB which should keep me going awhile. But unless I’m mistaken this will eventually happen again unless there is retention settings around job run outputs etc.
I guess my underlying question is how do I keep this from happening again? I dont see any retention settings, or ways to reduce the postgres DB size. Is the answer to keep upping the size?

data retention is definitely one of the key here

job history and job output probably would be what takes up majority of the space here

besides those I don’t have any more specific advise here.

Is there a way to delete Job history or job outputs in the data base or set retention periods around that? If not I can open a feature request for the ability to set job specific retention settings.

there is a management job built into AWX called Cleanup jobs that will delete Jobs and Job events. You can schedule this to run periodically, and to cleanup jobs older than, say, 30 days.

let us know if that helps!

1 Like

you can configure and schedule clean up job from the management jobs on the UI

1 Like

also occasional full vacuum might help too VACUUM FULL - PostgreSQL wiki

1 Like

This is all very helpful! I appreciate the clarification! :smiley:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.