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

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.

2 Likes

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.

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 :slight_smile:

1 Like