You are here

function backup_migrate_ui_manual_restore_form_submit in Backup and Migrate 7.2

Same name and namespace in other branches
  1. 8.2 backup_migrate.module \backup_migrate_ui_manual_restore_form_submit()
  2. 8.3 backup_migrate.module \backup_migrate_ui_manual_restore_form_submit()
  3. 5.2 backup_migrate.module \backup_migrate_ui_manual_restore_form_submit()
  4. 6.3 backup_migrate.module \backup_migrate_ui_manual_restore_form_submit()
  5. 6.2 backup_migrate.module \backup_migrate_ui_manual_restore_form_submit()
  6. 7.3 backup_migrate.module \backup_migrate_ui_manual_restore_form_submit()

The restore submit. Do the restore.

File

./backup_migrate.module, line 673
Create (manually or scheduled) and restore backups of your Drupal MySQL database with an option to exclude table data (e.g. cache_*)

Code

function backup_migrate_ui_manual_restore_form_submit($form, &$form_state) {
  $validators = array(
    'file_validate_extensions' => array(
      'gz zip sql mysql bz bz2 aes',
    ),
  );
  if ($file = file_save_upload('backup_migrate_restore_upload', $validators)) {
    backup_migrate_include('destinations');
    backup_migrate_perform_restore('upload', $file->uri, $form_state['values']);
  }
  $form_state['redirect'] = BACKUP_MIGRATE_MENU_PATH . '/restore';
}