Is there a mechanism to reset the Postgres DB to the state straight after the installation of AWX? The use case is to do a ‘factory reset’ of AWX without deleting and reinstalling from scratch.
Hi,
There is no inbuilt mechanism to factory reset AWX other than deleting and reinstalling from scratch. However, you may still work your way around the requirement using below mentioned steps:
Please note: In order for the below workaround to work, you would need to maintain a backup of “pgdocker” directory created under postgres_data_dir path after the fresh installation and successful migration [migrations_notran]. postgres_data_dir path is configured in AWX/installer/inventory file.
[root@oss-awx-02 installer]# cat inventory |grep pgdocker postgres_data_dir=/tmp/pgdocker
Workaround Steps:
- Stop all the docker containers.
[root@oss-awx-01 installer]# docker stop awx_task awx_web memcached rabbitmq postgres
- Delete pgdocker directory.
`
[root@oss-awx-01 installer]# rm -rf /tmp/pgdocker
`
- Copy the backed up pgdocker to the postgres_data_dir path.
`
[root@oss-awx-02 installer]# scp -r /tmp/pgdocker root@oss-awx-01:/tmp/
`
- Start all the docker containers.
[root@oss-awx-01 installer]# docker start awx_task awx_web memcached rabbitmq postgres
Hope this is helpful !
Thanks,
Shivharsh