The even shorter version is to use [[drush]] <code>civicrm-upgrade --tarfile=./sites/all/modules/contrib/civicrm-5.1.2-drupal.tar.gz --backup-dir=/tmp/</code> does all the above for you.
== Debugging and the CV command-line ==
If you have your CiviCRM sending errors to the Drupal Watchdog Log (CiviCRM Administer > System Settings > [https://equality-tech.com/civicrm/admin/setting/debug?reset=1 Debugging and Error Handling]), you can simply navigate to it in the Drupal Admin (Reports > [https://equality-tech.com/admin/reports/dblog Recent log messages])