CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Database corrupted during update
Pages: [1]

Author Topic: Database corrupted during update  (Read 2052 times)

Dale Baldwin

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
  • CiviCRM version: 3.4
  • CMS version: Drupal
  • MySQL version: 5
  • PHP version: 5
Database corrupted during update
April 01, 2012, 01:03:04 am
I tried updating a civicrm install from 3.4 to 4.1 in drupal 6 and the udpate script crashed, is there a way to recover the database, none of the normal tables exist but I do believe the data still exists and just need a way to get the table structure back.

This is the current table structure in the database, any help would be appreciated.

thanks

+----------------------------------------------------------------+
| Tables_in_civi_CRM                                             |
+----------------------------------------------------------------+
| civicrm_import_job_0932ab108c71443ca6a9ab3d18be6d9f            |
| civicrm_import_job_0bba945e83ae14f10db0dffe16f40b5e            |
| civicrm_import_job_0da73f3baaf26e15d15e5272b97dbec1            |
| civicrm_import_job_1339b987700f29e0d0019bf02442f318            |
| civicrm_import_job_1cc266a7b5c8c11ca1831332ddc3bcf5            |
| civicrm_import_job_2b9cfabe8fcfda012fa465ff71289e23            |
| civicrm_import_job_38ad5a15a21a9a2e24066b5ecb333b7e            |
| civicrm_import_job_3e55b3ccd4bf9250e840c16a70bac42d            |
| civicrm_import_job_4adf3902a044e13891d14747159880d2            |
| civicrm_import_job_56697d94d5422d2beb50f6bec6dc1345            |
| civicrm_import_job_574ca02e2e37a0aeca823b312f449113            |
| civicrm_import_job_5858f039cceeca27c6ed8816ed729f14            |
| civicrm_import_job_659707af6a71b07d94d5f64b1e5bce21            |
| civicrm_import_job_6a13e641c494a4fbbcfc7eb304c8bdcb            |
| civicrm_import_job_74b91335d52f5a5aa0894b294b9f57c8            |
| civicrm_import_job_76c4b4ac933c96fe88a46d3dbc4e467c            |
| civicrm_import_job_7c0e5bf5783ace71e87918a3d8cafb8a            |
| civicrm_import_job_8096b6af560f2511946585b4266e6554            |
| civicrm_import_job_8841a5daf85f95072abb2fb7124a06ef            |
| civicrm_import_job_8c7d29b6d6be02fcb52872df6dca59e1            |
| civicrm_import_job_920538a537f6680ef776e56b247d96c2            |
| civicrm_import_job_94bbd3b4d2d584e71460ef4911a004bc            |
| civicrm_import_job_965360e6e0b5e9b8d90596c18c583a3e            |
| civicrm_import_job_9c7ec8c45213881039d03fd650c2f62c            |
| civicrm_import_job_a892d1a862a6226187c52fd578179528            |
| civicrm_import_job_a94bf46a5e347e6d80793d75d5241d12            |
| civicrm_import_job_aac1900a261b9cd607f0b5343cb6a716            |
| civicrm_import_job_ab4f90947a160baf42b0b67cc6aff29c            |
| civicrm_import_job_aefeeb492abe563c4f28d4583eb06227            |
| civicrm_import_job_b45eaf8615ce44675399f5e976f364aa            |
| civicrm_import_job_b6eee733aa8f7ff8ab19afc0a57baa52            |
| civicrm_import_job_c06e0c678ea3ae7598a9fd5fd87fd0bc            |
| civicrm_import_job_c2f379c6fe822d863a342363317de895            |
| civicrm_import_job_c336ca23dc59952c5527a32787a33424            |
| civicrm_import_job_c3c1c0083ae687f412cf33e24d649b23            |
| civicrm_import_job_c5afc19fc670b8effa05b6caf4d9c4c7            |
| civicrm_import_job_c76cad3e0dd969e3303545f6f709150b            |
| civicrm_import_job_cc98573703ba1e34f484494a92311b30            |
| civicrm_import_job_cd9e980d9024b3206be0a0b2ad36d079            |
| civicrm_import_job_d510d4b39ec57179d723f3c30680e50d            |
| civicrm_import_job_d8dcf9f5dab5ea0c641de571e66c8363            |
| civicrm_import_job_e56286aca73856b8b53a41e70fce25ac            |
| civicrm_import_job_ea700f7cf17cec8bff2358947f597233            |
| civicrm_import_job_efafb64f0273c2eca1bec1e48b621920            |
| civicrm_import_job_f220d9c895cd47b85cf332ecaa0ef521            |
| civicrm_import_job_f589e6b0101daca08f1dbf4eff23a338            |
| civicrm_import_job_f736a4ba6386a50eb20cd88591e379db            |
| civicrm_preferences                                            |
| civicrm_task_action_temp_0e0921f9668d80d7f8d791f93d33c6ba_4338 |
| civicrm_task_action_temp_2a7c5dbc0886e4683e3f3db6503757e6_6078 |
| civicrm_task_action_temp_2a7c5dbc0886e4683e3f3db6503757e6_6276 |
| civicrm_task_action_temp_37b9f7c41510134be62be9c774ccfde3_7240 |
| civicrm_task_action_temp_4206fe706b95f2c3109a579745f3e2a4_7623 |
| civicrm_task_action_temp_645931657f4faf93395f605c4a884cfa_2375 |
| civicrm_task_action_temp_7193dace83b2e57dbb2bfbdf24372cdc_6872 |
| civicrm_task_action_temp_7fc44216810f2cdd65e395a1be7404a4_9268 |
| civicrm_task_action_temp_7fc44216810f2cdd65e395a1be7404a4_9953 |
| civicrm_task_action_temp_822f09a498d01e47ba74f324dcf8ef68_6541 |
| civicrm_task_action_temp_83afddf272210dc766dbbaefa0d0279f_2462 |
| civicrm_task_action_temp_92a929e01dcfa1f45a98dc10fa934b60_792  |
| civicrm_task_action_temp_9ccdf3748a133324cb04b13911b41be3_2457 |
| civicrm_task_action_temp_aab570871b46896315b30f8810d6c1b5_2498 |
| civicrm_task_action_temp_aab570871b46896315b30f8810d6c1b5_2721 |
| civicrm_task_action_temp_aab570871b46896315b30f8810d6c1b5_5364 |
| civicrm_task_action_temp_aab570871b46896315b30f8810d6c1b5_6372 |
| civicrm_task_action_temp_aab570871b46896315b30f8810d6c1b5_7846 |
| civicrm_task_action_temp_aab570871b46896315b30f8810d6c1b5_7982 |
| civicrm_task_action_temp_aab570871b46896315b30f8810d6c1b5_9110 |
| civicrm_task_action_temp_adafac048c878a03a9eb4ce45f2db68a_385  |
| civicrm_task_action_temp_adafac048c878a03a9eb4ce45f2db68a_7704 |
| civicrm_task_action_temp_b5d146a6fc0817da4cb328d3e3d69f11_5696 |
| civicrm_task_action_temp_b5d146a6fc0817da4cb328d3e3d69f11_6031 |
| civicrm_task_action_temp_b5d146a6fc0817da4cb328d3e3d69f11_6245 |
| civicrm_task_action_temp_b7c46cd1d1a31dc23a6e3ed9566463ce_4068 |
| civicrm_task_action_temp_b7c46cd1d1a31dc23a6e3ed9566463ce_6951 |
| civicrm_task_action_temp_bd3f144e7667e99e71b99c9bc31ebad8_3453 |
| civicrm_task_action_temp_bd3f144e7667e99e71b99c9bc31ebad8_354  |
| civicrm_task_action_temp_bd3f144e7667e99e71b99c9bc31ebad8_5450 |
| civicrm_task_action_temp_bd3f144e7667e99e71b99c9bc31ebad8_7110 |
| civicrm_task_action_temp_bd3f144e7667e99e71b99c9bc31ebad8_7386 |
| civicrm_task_action_temp_bd3f144e7667e99e71b99c9bc31ebad8_8324 |
| civicrm_task_action_temp_c41419a4bbfa24adc1a91f2407786c7f_1003 |
| civicrm_task_action_temp_c41419a4bbfa24adc1a91f2407786c7f_2325 |
| civicrm_task_action_temp_c41419a4bbfa24adc1a91f2407786c7f_3241 |
| civicrm_task_action_temp_de50e0f187afb855f95df84e2af64b20_3135 |
| civicrm_task_action_temp_de50e0f187afb855f95df84e2af64b20_3385 |
| civicrm_task_action_temp_de50e0f187afb855f95df84e2af64b20_4509 |
| civicrm_task_action_temp_de50e0f187afb855f95df84e2af64b20_9940 |
| civicrm_task_action_temp_e606ced23c7566e3d8f7bdf5108d6afc_5659 |
| civicrm_task_action_temp_ee951807fca5158c296b718a85866b73_2047 |
| civicrm_task_action_temp_f3921aa8b4487890c25fc1f3ed2ff068_8973 |
| log_civicrm_acl                                                |
| log_civicrm_acl_entity_role                                    |
| log_civicrm_activity                                           |
| log_civicrm_activity_assignment                                |
| log_civicrm_activity_target                                    |
| log_civicrm_address                                            |
| log_civicrm_address_format                                     |
| log_civicrm_batch                                              |
| log_civicrm_campaign                                           |
| log_civicrm_campaign_group                                     |
| log_civicrm_case                                               |
| log_civicrm_case_activity                                      |
| log_civicrm_case_contact                                       |
| log_civicrm_component                                          |
| log_civicrm_contact                                            |
| log_civicrm_contact_type                                       |
| log_civicrm_contribution                                       |
| log_civicrm_contribution_page                                  |
| log_civicrm_contribution_product                               |
| log_civicrm_contribution_recur                                 |
| log_civicrm_contribution_soft                                  |
| log_civicrm_contribution_type                                  |
| log_civicrm_contribution_widget                                |
| log_civicrm_country                                            |
| log_civicrm_county                                             |
| log_civicrm_currency                                           |
| log_civicrm_custom_field                                       |
| log_civicrm_custom_group                                       |
| log_civicrm_dashboard                                          |
| log_civicrm_dashboard_contact                                  |
| log_civicrm_dedupe_exception                                   |
| log_civicrm_dedupe_rule                                        |
| log_civicrm_dedupe_rule_group                                  |
| log_civicrm_discount                                           |
| log_civicrm_domain                                             |
| log_civicrm_email                                              |
| log_civicrm_entity_batch                                       |
| log_civicrm_entity_file                                        |
| log_civicrm_entity_financial_trxn                              |
| log_civicrm_entity_tag                                         |
| log_civicrm_event                                              |
| log_civicrm_file                                               |
| log_civicrm_financial_account                                  |
| log_civicrm_financial_trxn                                     |
| log_civicrm_grant                                              |
| log_civicrm_group                                              |
| log_civicrm_group_contact                                      |
| log_civicrm_group_nesting                                      |
| log_civicrm_group_organization                                 |
| log_civicrm_im                                                 |
| log_civicrm_line_item                                          |
| log_civicrm_loc_block                                          |
| log_civicrm_location_type                                      |
| log_civicrm_log                                                |
| log_civicrm_mail_settings                                      |
| log_civicrm_mailing                                            |
| log_civicrm_mailing_bounce_pattern                             |
| log_civicrm_mailing_bounce_type                                |
| log_civicrm_mailing_component                                  |
| log_civicrm_mailing_event_bounce                               |
| log_civicrm_mailing_event_confirm                              |
| log_civicrm_mailing_event_delivered                            |
| log_civicrm_mailing_event_forward                              |
| log_civicrm_mailing_event_opened                               |
| log_civicrm_mailing_event_queue                                |
| log_civicrm_mailing_event_reply                                |
| log_civicrm_mailing_event_subscribe                            |
| log_civicrm_mailing_event_trackable_url_open                   |
| log_civicrm_mailing_event_unsubscribe                          |
| log_civicrm_mailing_group                                      |
| log_civicrm_mailing_job                                        |
| log_civicrm_mailing_recipients                                 |
| log_civicrm_mailing_spool                                      |
| log_civicrm_mailing_trackable_url                              |
| log_civicrm_mapping                                            |
| log_civicrm_mapping_field                                      |
| log_civicrm_membership                                         |
| log_civicrm_membership_block                                   |
| log_civicrm_membership_log                                     |
| log_civicrm_membership_payment                                 |
| log_civicrm_membership_status                                  |
| log_civicrm_membership_type                                    |
| log_civicrm_menu                                               |
| log_civicrm_msg_template                                       |
| log_civicrm_navigation                                         |
| log_civicrm_note                                               |
| log_civicrm_openid                                             |
| log_civicrm_option_group                                       |
| log_civicrm_option_value                                       |
| log_civicrm_participant                                        |
| log_civicrm_participant_payment                                |
| log_civicrm_participant_status_type                            |
| log_civicrm_payment_processor                                  |
| log_civicrm_payment_processor_type                             |
| log_civicrm_pcp                                                |
| log_civicrm_pcp_block                                          |
| log_civicrm_persistent                                         |
| log_civicrm_phone                                              |
| log_civicrm_pledge                                             |
| log_civicrm_pledge_block                                       |
| log_civicrm_pledge_payment                                     |
| log_civicrm_preferences                                        |
| log_civicrm_preferences_date                                   |
| log_civicrm_premiums                                           |
| log_civicrm_premiums_product                                   |
| log_civicrm_price_field                                        |
| log_civicrm_price_field_value                                  |
| log_civicrm_price_set                                          |
| log_civicrm_price_set_entity                                   |
| log_civicrm_product                                            |
| log_civicrm_project                                            |
| log_civicrm_relationship                                       |
| log_civicrm_relationship_type                                  |
| log_civicrm_report_instance                                    |
| log_civicrm_saved_search                                       |
| log_civicrm_state_province                                     |
| log_civicrm_subscription_history                               |
| log_civicrm_survey                                             |
| log_civicrm_tag                                                |
| log_civicrm_task                                               |
| log_civicrm_task_status                                        |
| log_civicrm_tell_friend                                        |
| log_civicrm_timezone                                           |
| log_civicrm_uf_field                                           |
| log_civicrm_uf_group                                           |
| log_civicrm_uf_join                                            |
| log_civicrm_uf_match                                           |
| log_civicrm_value_ctd_participant_2                            |
| log_civicrm_value_facilitator_1                                |
| log_civicrm_website                                            |
| log_civicrm_worldregion   


xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Database corrupted during update
April 01, 2012, 01:17:26 am
Hi,

I don't think we delete any table as part of the upgrade. I'd suggest to restore your db post update and try again.

You might want to do that on a dev install first, where you can increase the timeout & memory available.

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Dale Baldwin

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
  • CiviCRM version: 3.4
  • CMS version: Drupal
  • MySQL version: 5
  • PHP version: 5
Re: Database corrupted during update
April 01, 2012, 02:57:55 am
Yeah my problem is my backup seems to have partly corrupted at some point, I think possibly from one of the 3.($) updates and going back to the backup hasn't worked.

Is there any way to role back the update?

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Database corrupted during update
April 01, 2012, 08:53:13 am
Can you also drop  civicrm_import_job_* and civicrm_task_action_temp_* table before trying to upgrade.

Do you have tables like civicrm_contact, civicrm_activity, i.e tables starting with civicrm_*


Kurund
Found this reply helpful? Support CiviCRM

Dale Baldwin

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
  • CiviCRM version: 3.4
  • CMS version: Drupal
  • MySQL version: 5
  • PHP version: 5
Re: Database corrupted during update
April 01, 2012, 04:15:53 pm
Karund none of those tables exist any more and I haven't dropped any of them, the table structure that appears above is directly out of the mysql running the show tables command.

Dale Baldwin

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
  • CiviCRM version: 3.4
  • CMS version: Drupal
  • MySQL version: 5
  • PHP version: 5
Re: Database corrupted during update
April 01, 2012, 09:29:09 pm
oh also tried using the repair tools here

http://wiki.civicrm.org/confluence/display/CRMDOC33/Database+Troubleshooting+Tools

They recreated the tables but can't populate them.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Database corrupted during update
April 01, 2012, 09:52:18 pm
Often when you can't roll back & re-apply it's because when you revert to backup you don't do a drop & create. Hence if civicrm_my_new_table was created in the upgrade it's still there after you've re-applied the backup. When you try to upgrade again it fails when it tries to create civicrm_my_new_table
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Dale Baldwin

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
  • CiviCRM version: 3.4
  • CMS version: Drupal
  • MySQL version: 5
  • PHP version: 5
Re: Database corrupted during update
April 01, 2012, 09:58:56 pm
Ouch so basically I'm screwed.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Database corrupted during update
April 01, 2012, 10:13:31 pm
Well, not if you have the backup.

I would
1) backup your current DB
2) drop your current DB
3) create an empty DB
4) restore your pre-update backup into it
5) drop those cruft tables before you try & possibly turn logging off (at risk of losing those log tables but I usually don't find I need logs forever)
6) try the DB tools again
7) backup your cleaned version of the DB
8) try the upgrade  again
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Dale Baldwin

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
  • CiviCRM version: 3.4
  • CMS version: Drupal
  • MySQL version: 5
  • PHP version: 5
Re: Database corrupted during update
April 01, 2012, 10:27:16 pm
Thanks for the help guys, though in this case I think it's going back and rebuilding from scratch, I have a monthly and nightly db backup process that kicks in in the day before the end of each month and it looks like its backed up the corrupted backup as well before I had a chance to pull the process.

Martin.Schwenke

  • I post occasionally
  • **
  • Posts: 35
  • Karma: 0
  • CiviCRM version: 4.1.x
  • CMS version: Drupal 6.x
  • MySQL version: 5.1.x
  • PHP version: 5.3.x
Re: Database corrupted during update
April 03, 2012, 05:52:12 pm
I thought I had corruption.  My database wouldn't restore because the triggers associated with logging weren't in sync with the current schema.  I deleted the triggers causing the failures from the backup and restored again.  Once I was back in business, switching off logging and making a new backup helped a lot...

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Database corrupted during update

This forum was archived on 2017-11-26.