You are here

function backup_migrate_restore_submit in Backup and Migrate 6

Same name and namespace in other branches
  1. 5 backup_migrate.module \backup_migrate_restore_submit()

The restore submit. Do the restore.

File

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

Code

function backup_migrate_restore_submit($form, &$form_state) {
  if ($file = file_save_upload('backup_migrate_restore_upload')) {
    _backup_migrate_restore_file($file->filepath, $file->filename, TRUE);
    watchdog('backup_migrate', 'Database restored from upload %file', array(
      '%file' => $file->filename,
    ));
  }
  $form_state['redirect'] = 'admin/content/backup_migrate/restore';
}