Upgrading a Drupal 6 or Drupal 7 site to Drupal 8 or Drupal 9: the command line steps

Presuming you’ve got a basic Drupal or Drutopia template based site set up with DDEV.

This is based largely on the Agaric training developed by Mauricio Dinarte, “Upgrading to Drupal 8 using the Migrate API”.

With these steps, we , leave the mysql command line prompt (the first exit), import our live database

ddev ssh
mysql -uroot -proot
create database d6;
GRANT ALL ON d6.* to 'db'@'%' IDENTIFIED BY 'db';
exit
mysql d6 < ../data/live.sql
exit
ddev . drush --yes si standard
chmod +w -R web/sites/default
ddev . drush --yes en migrate_plus migrate_tools migrate_upgrade:
ddev . drush --yes migrate:upgrade --legacy-db-key='d6' --legacy-root=/var/www/html/d6 --configure-only
ddev . drush --yes config:export

Deciding which migrations you’re going to bother to fix

ddev ssh
mysql
use d6
MariaDB [db]> SELECT nt.name, nt.type, COUNT(n.nid) FROM node_type nt LEFT JOIN node n ON nt.type = n.type GROUP BY (nt.type) ORDER BY COUNT(n.nid) DESC;
+---------------------------+----------------+--------------+
| name                      | type           | COUNT(n.nid) |
+---------------------------+----------------+--------------+
| Activity Stream Item      | activitystream |         2765 |
| Blog entry                | blog           |          114 |
| Event                     | event          |           83 |
| Photo                     | photo          |           43 |
| Video                     | video          |           21 |
| News                      | news           |           21 |
| Page                      | page           |           13 |
| Statistics and Highlights | stat           |           10 |
| Resource                  | resource       |            7 |
| Sponsor                   | sponsor        |            6 |
| Story                     | story          |            5 |
| In the news               | inthenews      |            4 |
| Incoming iCal Feed        | feed_ical      |            2 |
| Webform                   | webform        |            1 |
| Newsletter issue          | simplenews     |            0 |
| Gallery                   | gallery        |            0 |
| Feed                      | feed           |            0 |
+---------------------------+----------------+--------------+
17 rows in set (0.02 sec)

File was never moved and the long weird string is just a placeholder.

Cribbing from https://pad.riseup.net/p/migrate-badcamp2019-keep