SQL export contacts from Mariadb and reimport into new database

Hi,
we had to upgrade from Mariadb5 to Mariadb10. Since we had issues with our Nextcloudserver (12.0.6) we decided to do a new blank installation (13.0.0).
We missed to do an export of our contacts, but we still have the old Mariadb5 running. Is there a way to do an sql export and reimport the data to our new database?
We’ve tried to do the following:
We did an sql export of the whole oc_cards and the oc_cards_properties table and imported them into the new database. But we cannot see any of the contacts in nextcloud?
Is there a clean way to do this via blank sql ex- and reimport?

OK, we’ve solved it after updating the addressbookid in the oc_cards table to the corresponding id in the oc_addressbooks table.

HI Geom,

I see you resolve your query, but i have a query of my own, not as same like you but similar.
I have a DB in Taiwan attached to NAS and maria DB in China attached to NAS, both the maria DB and NAS are different in Taiwan and China.
I successfully sync the NAS data between Taiwan and China, but facing problem in syncing maria DB, it is production environment so I did not experiment too much.
Currently, i have issues, that if i am adding new user in China, i have to manually create the same user in Taiwan.
Can I some how sync the maria db between China and Taiwan, so that anywhere i can create the user, it will be present synced.
I am new to mysql and Linux, so if you can guide me where I can look for more information to merge the both maria DB of China and Taiwan.

Thanks in advance

Don’t know if you manage to solve it, but you can use an external authentication method for both, using LDAP for example. And every time the user logs in, it will check the password in a single and separate database (only for authentication). That way you’ll be able to have 2 different Nextcloud instances with a single user database, and if the user changes its password, it will be updated in you LDAP instance.