2. Create a migration source database and populate it from the database dump file.
1. Get the database dump file: Run the db_dump job in Jenkins or login to `wms-aux1` and as user `wcmsadmi` run `db-dump.php` from `uw_wcms_tools`. For the Pool, use "staging". Put the resulting `sqldump_filtered` file into your VM. The filename of this will be referred to as `SQL_DUMP_FILE`.
2. Create ~/.my.cnf with:
```
[client]
user = root
password = password
```
3. Run:
```
mysql --execute="DROP DATABASE IF EXISTS migrate_source; CREATE DATABASE migrate_source; GRANT ALL ON migrate_source.* TO 'drupal';"
mysql migrate_source < SQL_DUMP_FILE
```
I the above, `drupal` must be the database user that this site uses. In d4d, add ` -hmariadb` after `mysql`.
3. Run Drush commands using Drush 10:
```
drush en uw_migrate -y
drush mim --group=uw --continue-on-failure
```
In this example, the source site URL is https://uwaterloo.ca/web-resources
and the site path is sites/ca.web-resources/files.
4. Manually set the site name, colors, and other settings that do not get migrated.
## Commands
*`drush ms --group=uw`: Display available UW migrations.
*`drush mim --group=uw --continue-on-failure`: Run available UW migrations.
*`drush migrate:rollback --group=uw`: Undo a migration. This doesn't completely undo the migration. For a full test, you need to reinstall the site or restore to a database dump of the site before the migration.
*`drush mim uw_ct_site_footer --continue-on-failure`: Manually run one migration. This doesn't take into consideration dependencies.
*`php run-tests.php http://nginx --suppress-deprecations --module uw_migrate`: Run the tests in uw_migrate.
## Tips:
*`skip_on_empty` process plugin doesn't work correctly with multiple values.
## Tips
*`skip_on_empty` process plugin [doesn't work correctly with multiple values](https://www.drupal.org/project/drupal/issues/2905929#comment-13537872).
There is a workaround to use `single_value` plugin before `skip_on_empty`.