0

Under How to Transfer Big Data to a Different Domain, I asked a question about transferring data to a different domain, but I couldn't find a solution. Before writing a comment, please read the information I have provided here. So I tried to implement my own solution. However, according to my mistake, my own solution steps did not work.


Namely;

I installed a joomla and CiviCRM from scratch. I didn't make any customization and updates in my installation.

Then I threw the following tables and all log tables into new SQL. I have not encountered any errors in this transfer. (I transferred by typing _bacup next to the existing table names to avoid conflicts.)

  1. civicrm_activity
  2. civicrm_activity
  3. civicrm_activity_contact
  4. civicrm_contact
  5. civicrm_custom_field
  6. civicrm_custom_group
  7. civicrm_email
  8. civicrm_log
  9. civicrm_option_group
  10. civicrm_option_value
  11. civicrm_phone
  12. civicrm_setting
  13. civicrm_uf_match
  14. joomla_usergroups
  15. joomla_users
  16. joomla_user_usergroup_map

Now when I try to log in to CiviCRM I get an error like the following. Do you know about the solution to this error?

CiviCRM_API3_Exception: "DB Error: constraint violation"

6
  • To get more information about the error. You can run the api from the API explorer and check the box debug. You will probably then get a backtrace of where in the api the error occurs. Commented Nov 19, 2019 at 8:30
  • How do I access the API when I can't log in to CiviCRM? Commented Nov 19, 2019 at 8:38
  • Ah than you are stuck because I made the assumption you could login into civicrm and just one specific api is causing a trouble. But that is not the case. This still sound you did not do the import/backup correctly. Commented Nov 19, 2019 at 8:41
  • There's serious data. CiviCRM gives an error because the export and import data from their menu is large. I can't update. I need to get these files to a clean CiviCRM. So when I make a transfer, which tables do I need to import from the database? Commented Nov 19, 2019 at 8:47
  • A rule of thumb is that you need all of them. And you dont usually have to do a transfer (or I have not come in such situations where it is really needed). Commented Nov 19, 2019 at 8:58

1 Answer 1

1

I share my solution for the problem. First of all, I did this because of a partially loaded database problem. I was getting this error when I did any CiviCRM version upgrade.

When I checked the database, the information in the "civicrm_domain" table was displayed as "5.14.alpha1.upgrade". However, because the site was an FTP update CiviCRM version 5.19.1 was.

First of all, I set up a backup of a time before 5.14 with a different subdomain. Then I upgraded the Joomla and CiviCRM version of this backup to the version I had problems, ie 5.14.1.

Then I deleted everything in the database, including Joomla tables. I have thrown the SQL files with the actual site data into the SQL files of the new subdomain. In the "civicrm_domain" table, I manually changed the version information to "5.14.1".

After that I started the update with the URL of CiviCRM 5.15.0 in Joomla Plugin Update and this time I didn't get "partially loaded database" error and the whole update was successful.

The only problem is that any update, installation and uninstallation of the CiviCRM plug-ins is displayed. I have raised a question for this error. You can also follow it if you want. Of course, that problem will be corrected.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.