I have logs of the script output to document this, but after digging in myself it looks like the migration script wasn’t tested well at all. I was running a ‘migrate on same server’ as recommended by the docs - I haven’t rested the remote migration but that may have some of these problems too (some of them it doesn’t from comparing the code)
--dry-runflag is ignored and does a live run! This is because EE_DRY_RUN is defined but never used in the code.
<site-name>doesn’t work - looks like it isn’t used in the code, the script effectively always does
- If PHP7.2 is missing it doesn’t warn, but continues then (because of the problems above) breaks every site as EEv3 is removed and EEv4 can’t run.
- Migration fails due to incorrect paths / undefined vars. Comparing run_ee4_sites_8080() and run_ee4_sites_8080_remote(), the block of code that defines
EE4_SITE_HTDOCShas been missed out.
(I should add the caveat that I have written some bash scripts but am no guru so could be wrong of course!)
I don’t envy you the task of providing the migration script, and it’s amazing that you did. But this feels like it wasn’t even tested - these are glaring errors that completely and irreversibly broke my server requiring a rollback.