You are here

function backup_migrate_restore_submit in Backup and Migrate 5

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

The restore submit. Do the restore.

File

./backup_migrate.module, line 416
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_id, $form_values) {
  if ($file = file_check_upload('backup_migrate_restore_upload')) {
    _backup_migrate_restore_file($file->filepath, $file->filename, true);
    watchdog('backup_migrate', t('Database restored from upload %file', array(
      '%file' => $file->filename,
    )));
  }
  return 'admin/content/backup_migrate/restore';
}