This is apparently a feature we're supposed to have, but I have never seen a site put offline during a migration.
In my opinion, the site should at least be put in "maintenance mode" before the database backup is performed. Adrian told me it was supposed to be redirected somewhere else during the migration, but I have not seen that happen while reloading regularly the site during a migration.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 632984.patch | 1.66 KB | mig5 |
| #5 | 632984.patch | 1.59 KB | mig5 |
| #4 | 632984.patch | 1.59 KB | mig5 |
Comments
Comment #1
anarcat commentedplatform/migrate.provision.inc does say:
However nothing in the code actually does that from what i can tell.
Comment #2
anarcat commentedI tried this:
For some reason this fails with:
Comment #3
Anonymous (not verified) commentedThis works better, take advantage of some of drush2.1's new features
This puts the site into offline mode prior to migrate.
However! I put the site back online in the post_ hook but it doesn't work - drush will fail with
This is because technically the site is 'deleted' here: the site dir doesn't exist, we've just deleted it. We need to assume the site is in offline state stll after invoking 'provision deploy', and set it back online in the deploy post hook.
(I think)
Comment #4
Anonymous (not verified) commentedPlease test
Comment #5
Anonymous (not verified) commentedPlease test
Comment #6
Anonymous (not verified) commentedUpdated patch, doesn't use vset, just writes
$conf['site_offline'] = 1;to the settings.php for that fleeting moment before the site dir gets blown away prior to invoking provision deploy.Since we use drush_set_option here, we can then accurately unset that variable on rollback and regenerate the settings.php without this setting, taking the site back out of offline mode should Migrate fail.
Comment #7
adrian commentedcomitted a simpler version.
Comment #8
Anonymous (not verified) commented