Tried to upgrade CiviCRM on Drupal 7 website. Drupal core 7.73. Using PHP 7.1. Upgrade process started well but received this message: You must reload the database with the backup and try the upgrade process again. I do have a good backup of database. What should I do? How do you reload the database?

  • 1
    Hi Vic - how to reload a backup isn't specifically a CiviCRM question so you may find another SE channel that will give you a better response, but i will poke someone who may be able to chip in.
    – petednz - fuzion
    Commented Oct 6, 2020 at 3:00
  • I was curious about the word reload. I believe I have to drop current database, recreate a new one and restore from the good backup. There is no reloading database process I can think of. I basically need to go back to (restore) earlier database and corresponding Drupal website that had civiCRM 5.12. Is that right? Thanks.
    – Vic
    Commented Oct 6, 2020 at 13:12

3 Answers 3


Welcome to SE! There's lots of useful advice from Luke in his answer but I'd start by looking at the CiviCRM log file.

That error message is a bit misleading. It's not random luck as to whether an upgrade succeeds so restoring to the previous state and just trying the same upgrade code is very unlikely to produce a better result. The upgrade probably failed because of a mismatch between what the code was expecting to find in your system, and what it actually found. Until you track down and correct that problem reloading and repeating won't help.

You can often fix the problem and continue the upgrade without reloading a backup.

If you look at the log file you should see the various upgrade steps logged there. What was the last successful upgrade step? What messages do you get after that?


The log file shows: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs

Updated table to row_format=dynamic and then reran the upgrade.

  • Thanks Aidan. I did get a message when the upgrade process started. I did not write it down. It said something like "300 sec script timed out". The progress bar froze within first few minutes. I waited for a while. Nothing changed. I was able to go the website. Then I saw 5.29 on CiviCRM bottom page. Also, the partial completion message as I posted in this question. I am able to use the website and civiCRM contacts.
    – Vic
    Commented Oct 6, 2020 at 13:19
  • That might actually be good news! It took a long time but may have completed successfully although your browser or proxy got fed up of waiting. The log file under sites/default/files/civicrm/ConfigAndLog will provide more answers.
    – Aidan
    Commented Oct 6, 2020 at 13:35
  • I am looking at that file. I believe I should seek some expert help.
    – Vic
    Commented Oct 6, 2020 at 13:47
  • Oct 05 06:35:26 [info] $CRM_Queue_ErrorPolicy_reportError = Array ( [is_error] => 1 [is_continue] => 0 [exception] => Error 1: Maximum execution time of 300 seconds exceeded in public_html/sites/all/modules/civicrm/CRM/Core/Error.php, line 827 [last_task_title] => Add title to civicrm_payment_processor
    – Vic
    Commented Oct 6, 2020 at 13:47
  • If you put the complete log file on gist or something we can take a look.
    – Aidan
    Commented Oct 6, 2020 at 13:54

You'll need to track down what caused your error first however. I'd take a copy of your database, potentially a backup of your "broken" database depending on whether this is of any use to you.

The easiest way (assuming you are runnign on dev) is to drop the existing database, recreate it and reload your backup. The exact details for this will depend on how you are interfacing with your mysql/mariadb server - either via a command line (using mysql, or potentially using phpmyadmin or similar) or you might have a different GUI based way. Check the relevant documentation for the tool you are using. This process should be the same as you might restore you live site from backup.

Some things to think about.

You probably shouldn't have any problems if you are reloading the same database but you might want to think about stripping out triggers and views due to them including a "definer" which can cause problems. Assuming you are using the command line the following perl will do this:

perl -pi -e 's#\/\*\!5001[7|3].*?`[^\*]*\*\/##g' /path/to/mysqldump.sql

For more about that perl and triggers check this question

You will probably want to identify how and why your upgrade failed. Your civicrm_log table will show you which upgrades ran giving you an idea of where you got up to.

If you have the upgrade window open you can check the console - sometimes error messages will show there.

Then you could try your drupal watchdog log (if enabled).

Otherwise you want to dig into your Civicrm Log - This can usually be found under sites/default/files/civicrm/ConfigAndLog although this can be customised so if you don't see it there check your civicrm.files directory. (Admin -> System Settings-> Directories)

If you have a large database and are loading it via the command line you might want to use a utility like pv to track how far through the import you have gotten.

Otherwise you might want to run this upgrade in a staged process - get yourself up to the last upgrade that succeeded by downloading that version first - you can swap out the version in the download link - then run another backup so you won't have as far to upgrade the next time.

  • Thanks Luke for detailed answer. I will follow those steps.
    – Vic
    Commented Oct 6, 2020 at 13:14

There were two discussions about problems 5.29 upgrade recently. Maybe some information in those threads may also help you...

Update to 5.29.0 get frozen

Upgrade db failed for 5:29

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.