Importing DB data from Hammer to Ivanchuk

Hello all,
anyone experienced the same problem with upgrading from Hammer (hammer-4.20190329011451_d08635f ) to Ivanchuk (ivanchuk-2.20191210154807_f173b5b) and importing Hammer data into new Ivanchuk DB?

We have installed Ivanchuk and created brand new PG DB. Then performed:
rake db:migrate
rake evm:automate:reset
on the new database.

Then we copied data from the old DB and started evm server.
All seemed to go without any problem.

After that in ManageIQ console, we lost all custom tags, there are no zones and servers in them.
Also, our custom service dialogs wont load the dynamic data.

Anyone went through a similar scenario or knows how to do this in a proper way so that the new version contains same structure and data as the old one?

Thank you for any advice

It sounds like you did things in the wrong order… You need to

  • export the old data from the old OG
  • import the data into the new PG
  • rake db:migrate on the new PG
  • rake evm:automate:reset on the new PG

Note that servers have identity (stored in the /var/www/miq/vmdb/GUID file), so if you are creating new appliances to replace old ones and want that identity to come over then that file needs to come over too.

1 Like

Hi, thank you.
I have also tried to do things in the order you mentioned. The problem is that when
I ran db:migrate, I got the following error:

undefined method `tenant_identity’ for nil:NilClass

I could not get rid of this error so we tried to prepare the DB first and import the data in the end.

Important note is that the old DB is PG 9 while new one is PG 12

This sounds like a bug during upgrade. cc @gtanzillo

@anders_ulrich i must have missed this comment. When you upgrade PG versions you need to also pg_upgrade that database - .

Please also note that ManageIQ is supported for PG 10, and while we’d like to get to newer versions, we can’t guarantee that things will work on them.