| 1 |
<?php
|
| 2 |
|
| 3 |
/**
|
| 4 |
* @file manual site migrate system
|
| 5 |
*/
|
| 6 |
|
| 7 |
function drush_provision_hostmaster_migrate_validate($site, $platform) {
|
| 8 |
// verify the target platform:
|
| 9 |
$data = drush_get_merged_options(); // XXX: necessary because the remote
|
| 10 |
// platform may not have been
|
| 11 |
// initialised by the frontend (this
|
| 12 |
// should be checked instead)
|
| 13 |
$data['root'] = $platform;
|
| 14 |
$data['r'] = $platform;
|
| 15 |
drush_backend_invoke('provision verify', $data);
|
| 16 |
// verify the current platform
|
| 17 |
drush_backend_invoke('provision verify', array('root' => drush_get_option(array('r', 'root'), drush_locate_root())));
|
| 18 |
// verify the site prior to migration
|
| 19 |
drush_backend_invoke('provision verify', array($site));
|
| 20 |
}
|
| 21 |
|
| 22 |
function drush_provision_pre_hostmaster_migrate($site, $platform) {
|
| 23 |
drush_backend_invoke('hostmaster park', array($site, 'uri' => $site));
|
| 24 |
}
|
| 25 |
|
| 26 |
function drush_provision_hostmaster_migrate($site, $platform) {
|
| 27 |
drush_backend_invoke('provision clone', array($site, $site, $platform));
|
| 28 |
}
|
| 29 |
|
| 30 |
function drush_provision_hostmaster_migrate_rollback($site, $platform) {
|
| 31 |
drush_backend_invoke('provision delete ', array($site, 'root' => $platform));
|
| 32 |
}
|
| 33 |
|
| 34 |
function drush_provision_post_hostmaster_migrate($site, $platform) {
|
| 35 |
drush_backend_invoke('hostmaster unpark', array($site, 'uri' => $site, 'root' => $platform));
|
| 36 |
if (!drush_get_error()) {
|
| 37 |
drush_backend_invoke('provision delete', array($site));
|
| 38 |
drush_backend_invoke('provision verify', array($site, 'root' => $platform, 'publish_path' => $platform));
|
| 39 |
}
|
| 40 |
}
|