source : https://geekdudes.wordpress.com/2019/12/12/upgrading-migrating-awx-ansible-on-centos-7/
pip3 install ansible-tower-cli --upgrade
AWX_OLD=http://tower-old.demo.local
PASSWORD_OLD='myOldPassword'
awx-cli receive -u admin -p $PASSWORD_OLD -h $AWX_OLD --credential all > credential.json
awx-cli receive -u admin -p $PASSWORD_OLD -h $AWX_OLD --credential_type all > credential_type.json
awx-cli receive -u admin -p $PASSWORD_OLD -h $AWX_OLD --project all > project.json
awx-cli receive -u admin -p $PASSWORD_OLD -h $AWX_OLD --inventory all > inventory.json
awx-cli receive -u admin -p $PASSWORD_OLD -h $AWX_OLD --job_template all > job_template.json
awx-cli receive -u admin -p $PASSWORD_OLD -h $AWX_OLD --workflow all > workflow.json
AWX_NEW=https://tower.demo.local
PASSWORD_NEW='myNewPassword'
awx-cli send -u admin -p $PASSWORD_NEW -h $AWX_NEW credential_type.json
awx-cli send -u admin -p $PASSWORD_NEW -h $AWX_NEW credential.json
Please note that passwords won't be exported, you'll need to enter it manually after usernames are imported (Credentials section in Web GUI)
If projects are defined with credential, reset password manually before importing project.
awx-cli send -u admin -p $PASSWORD_NEW -h $AWX_NEW project.json
awx-cli send -u admin -p $PASSWORD_NEW -h $AWX_NEW inventory.json
Why ? I didn't use this command.
sed -i '/\bcredential\b/d' job_template.json
awx-cli send -u admin -p $PASSWORD_NEW -h $AWX_NEW job_template.json
awx-cli send -u admin -p $PASSWORD_NEW -h $AWX_NEW workflow.json