1

I have tried to use backup and migrate from an existing system into a fresh Bitnami Drupal 7.4.1 Civicrm 4.6.9 install on another machine. Win10 BandM 7.x-3.1 I received the following error: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1217 Cannot delete or update a parent row: a foreign key constraint fails in backup_migrate_source_db_mysql->_restore_db_from_file() (line 199 of C:\Bitnami\civicrm-4.6.9-1\apps\civicrm\htdocs\sites\all\modules\backup_migrate\includes\sources.db.mysql.inc) I looked at the existing answers and am unable to get it to work. Please help.

1

Backup and Migrate module may not be compatible with CiviCRM, and may not understand how to handle the many foreign key constraints within CiviCRM.

Here is the easy way:

  1. Drop the database entirely (back it up first please)

  2. recreate that database with the same name

  3. then restore from your backup.

Here is the hard way: Particularly, if a failed update has altered the table structure of your database, simply restoring may not work with any tool, because the schema has changed. More information: http://wiki.civicrm.org/confluence/display/CRMDOC/Ensuring+Schema+Integrity+on+Upgrades

  • Thank you. That was easy, the BAM module had me consumed for hours. This was a few minutes. Thanks so much. My version of PHPMyadmin had an import feature which made it very easy. – Hock Nov 9 '15 at 5:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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