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?
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.
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
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.