# Migrate hosts and inventory from Postgres DB v17.0.1 to latest 24.6.1 release?

**URL:** <https://forum.ansible.com/t/migrate-hosts-and-inventory-from-postgres-db-v17-0-1-to-latest-24-6-1-release/43316>\
**Category:** Get Help\
**Tags:** kubernetes, awx, postgresql\
**Created:** [June 11, 2025, 5:55pm UTC](https://forum.ansible.com/t/migrate-hosts-and-inventory-from-postgres-db-v17-0-1-to-latest-24-6-1-release/43316 "2025-06-11T17:55:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Swampcritter](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/swampcritter/32/8778_2.png) [@Swampcritter](https://forum.ansible.com/u/Swampcritter)\
**Post date:** [June 11, 2025, 5:55pm UTC](https://forum.ansible.com/t/migrate-hosts-and-inventory-from-postgres-db-v17-0-1-to-latest-24-6-1-release/43316/1 "2025-06-11T17:55:39Z")

</div>

Is it possible to migrate the hosts and inventory from the Postgres DB running under docker w/ AWX v17.0.1 to the latest AWX v24.6.1 release running under minikube / kubernetes?

I have approximately 150+ hosts and several inventory groups.

---

<div class="post-metadata">

**Author:** ![Andersson007](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/andersson007/32/89_2.png) [@Andersson007](https://forum.ansible.com/u/Andersson007)\
**Post date:** [June 16, 2025, 7:01am UTC](https://forum.ansible.com/t/migrate-hosts-and-inventory-from-postgres-db-v17-0-1-to-latest-24-6-1-release/43316/2 "2025-06-16T07:01:30Z")

</div>

I don’t know if there’s a native solution, but how about using the COPY FROM/TO postgres command?

1. Dump the current DB as plain text and find the related tables/columns in it
2. Use the COPY command to fetch information from the database (corresponding tables/columns) to a file (you can specify the format as XML)
3. In the new database, see if the tables/column names are the same. If yes, use COPY FROM to upload the data to same columns or adjust the tables/column names if needed.

---

<div class="post-metadata">

**Author:** ![motorbass](https://avatars.discourse-cdn.com/v4/letter/m/13edae/32.png) [@motorbass](https://forum.ansible.com/u/motorbass)\
**Post date:** [June 23, 2025, 12:53pm UTC](https://forum.ansible.com/t/migrate-hosts-and-inventory-from-postgres-db-v17-0-1-to-latest-24-6-1-release/43316/3 "2025-06-23T12:53:20Z")

</div>

Else, why don’t you export/import your data through AWX before/after migration using `awx export --conf.token my_token --conf.host https://awx.awx.com -k > awx_full.json`

I mean, if you can afford to set up a test cluster in 24.6.1 first, then you can easily export/import data and see if everything run fine or not (as you make a huge jump between v17-v24)

Probably not the best way but seems like a workaround 🙂
