Hello Kan,
AWX does not provide any integrated solution to perform backup and restore and therefore the upgrades and migrations can only be performed as a fresh installation. In AWX there does exist a workaround, which involves copying the PostgreSQL data directory and using the same with a fresh installation to restore the backup.
In order to implement the workaround we need to perform following steps:
1. Stop the PostgreSQL docker container and copy the content of /var/lib/pgdocker directory on awx node to the same directory on awx-2 node:
$ docker stop <container_id>
$ scp -r ./pgdocker awx-2:/var/lib/
2. Edit inventory file in installer directory on awx-2 node and provide the location of pgdocker directory in postgres_data_dir variable:
Set value of "postgres_data_dir" in inventory file
$ vi inventory
postgres_data_dir = </var/lib/pgdocker>
3. Install AWX as a fresh installation in awx-2 node using the modified inventory file:
$ ansible-playbook -i inventory install.yml –vv
4. The backed up content of awx will be visible on awx-2 dashboard.