You are here

function acquia_migrate_batch_tar in Acquia Connector 6.2

Same name and namespace in other branches
  1. 7.2 acquia_agent/acquia_agent.migrate.inc \acquia_migrate_batch_tar()
1 string reference to 'acquia_migrate_batch_tar'
acquia_agent_migrate_form_submit in acquia_agent/acquia_agent.pages.inc
Submit handler for Acquia Cloud migrate button.

File

acquia_agent/acquia_agent.migrate.inc, line 230
Upload to Acquia Cloud.

Code

function acquia_migrate_batch_tar($migration, &$context) {
  _acquia_migrate_process_setup();

  // Latest migration is in $context.
  if (!empty($context['results']['migration'])) {
    $migration = $context['results']['migration'];
    variable_set('acquia_agent_cloud_migration', $migration);
  }

  // Check for error and abort if appropriate.
  if (empty($migration) || $migration['error'] !== FALSE) {
    $context['message'] = t('Encountered error, aborting migration.');
    return;
  }
  _acquia_migrate_archive_site($migration);

  // Store migration in results so it can be used by next operation.
  $context['results']['migration'] = $migration;
  $context['message'] = t('Created archive. Beginning transfer.');
}