# Empty postgres DB after upgrade to awx release 1.0.2

**URL:** <https://forum.ansible.com/t/empty-postgres-db-after-upgrade-to-awx-release-1-0-2/26461>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [January 11, 2018, 9:55am UTC](https://forum.ansible.com/t/empty-postgres-db-after-upgrade-to-awx-release-1-0-2/26461 "2018-01-11T09:55:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![christian.flickinger](https://avatars.discourse-cdn.com/v4/letter/c/da6949/32.png) [@christian.flickinger](https://forum.ansible.com/u/christian.flickinger)\
**Post date:** [January 11, 2018, 9:55am UTC](https://forum.ansible.com/t/empty-postgres-db-after-upgrade-to-awx-release-1-0-2/26461/1 "2018-01-11T09:55:14Z")

</div>

Hi,

yesterday i´ve cloned the gitrepository to upgrade awx to newest release 1.0.2 and install it via “ansible-playbook -i inventory install.yml” after fit pgdocker Path to my already existing Database.  
Bevor installing i did a directory copy of the DB directory.

After deploying the new containers awx startet to make a upgrade (seen via webbrowser) and the postgres DB is empty.

1. Why did awx do an upgrade? It should use the existing DB
2. After copying the DB directory i´ve saved before to original path, the whole process startet again → upgrading and empty postgres DB.

At the moment i am not able to use my existing DB.

Does anybody now whats going wrong here?

Christian

---

<div class="post-metadata">

**Author:** ![christian.flickinger](https://avatars.discourse-cdn.com/v4/letter/c/da6949/32.png) [@christian.flickinger](https://forum.ansible.com/u/christian.flickinger)\
**Post date:** [January 11, 2018, 10:12am UTC](https://forum.ansible.com/t/empty-postgres-db-after-upgrade-to-awx-release-1-0-2/26461/2 "2018-01-11T10:12:57Z")

</div>

attachment:

If i redeploy an older awx Version (october 30. 2017) and use the ansible-playbook -i inventory install.yml command to install the cloned gitrepository, the DB persist.

So it must have been in new Version 1.0.2

Christian

---

<div class="post-metadata">

**Author:** ![Cesar\_Sanchez2](https://avatars.discourse-cdn.com/v4/letter/c/f6c823/32.png) [@Cesar\_Sanchez2](https://forum.ansible.com/u/Cesar_Sanchez2)\
**Post date:** [January 18, 2018, 1:34am UTC](https://forum.ansible.com/t/empty-postgres-db-after-upgrade-to-awx-release-1-0-2/26461/3 "2018-01-18T01:34:34Z")

</div>

I think what you’re getting here is the effect of the new PGDATA environment variable for the postgres container that creates the new database in pgdocker/pgdata instead.

-Cesar
