function backup_migrate_perform_restore

cis7 backup_migrate.module backup_migrate_perform_restore($destination_id, $file, $settings = array())
cle7 backup_migrate.module backup_migrate_perform_restore($destination_id, $file, $settings = array())
elmsmedia7 backup_migrate.module backup_migrate_perform_restore($destination_id, $file, $settings = array())
icor7 backup_migrate.module backup_migrate_perform_restore($destination_id, $file, $settings = array())
meedjum_blog7 backup_migrate.module backup_migrate_perform_restore($destination_id, $file, $settings = array())
mooc7 backup_migrate.module backup_migrate_perform_restore($destination_id, $file, $settings = array())

Restore from a file in the given destination.

4 calls to backup_migrate_perform_restore()
backup_migrate_destination_db::save_file in sites/all/modules/ulmus/backup_migrate/includes/
Save the info by importing it into the database.
backup_migrate_drush_restore in sites/all/modules/ulmus/backup_migrate/includes/
Restore to the default database.
backup_migrate_ui_destination_restore_file_confirm_submit in sites/all/modules/ulmus/backup_migrate/includes/
Do the file restore.
backup_migrate_ui_manual_restore_form_submit in sites/all/modules/ulmus/backup_migrate/backup_migrate.module
The restore submit. Do the restore.


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


function backup_migrate_perform_restore($destination_id, $file, $settings = array()) {
  backup_migrate_include('files', 'filters');

  // If not in 'safe mode', increase the maximum execution time:
  if (!ini_get('safe_mode') && strpos(ini_get('disable_functions'), 'set_time_limit') === FALSE && ini_get('max_execution_time') != 0 && ini_get('max_execution_time') < variable_get('backup_migrate_restore_max_time', 1200)) {
    set_time_limit(variable_get('backup_migrate_restore_max_time', 1200));

  // Make the settings into a default profile.
  if (!is_object($settings)) {
    $settings = backup_migrate_crud_create_item('profile', $settings);
    $settings->source_id = empty($settings->source_id) ? 'db' : $settings->source_id;

  // Register shutdown callback.
  register_shutdown_function('backup_migrate_shutdown', $settings);

  if (!is_object($file)) {
    // Load the file from the destination.
    $file = backup_migrate_destination_get_file($destination_id, $file);
    if (!$file) {
      _backup_migrate_message("Could not restore because the file could not be loaded from the destination.", array(), 'error');
      return FALSE;
  $file_id = $file->file_id();

  // Filter the file and perform the restore.
  $file = backup_migrate_filters_restore($file, $settings);
  if (!$file) {
    if (_backup_migrate_check_timeout()) {
      backup_migrate_restore_fail('Could not perform the restore because the script timed out. Try increasing your PHP <a href="!url">max_execution_time setting</a>.', array('!url' => ''), 'error');
    else {
      backup_migrate_restore_fail("Could not perform the restore.", array(), 'error');
    return FALSE;

  $time = timer_stop('backup_migrate_restore');
  if ($file) {
    $destination = backup_migrate_get_destination($destination_id);
    $message = '%source restored from %dest file %file in !time ms. !action';
    $params = array(
      '%file' => $file->filename(),
      '%source' => $settings->get_source_name(),
      '%dest' => $destination->get_name(),
      '!time' => $time['time'],
      '!action' => !empty($settings->performed_action) ? $settings->performed_action : '',
    if ($destination && $destination->op('list files')) {
      $params['!links'] = t('<a href="!restoreurl">Restore again</a>', array('!restoreurl' => url(BACKUP_MIGRATE_MENU_PATH . '/destination/restorefile/' . $destination_id . "/" . $file_id)));
    backup_migrate_restore_succeed($message, $params, $settings);
  // Delete any temp files we've created.

  // No errors. Return the file.
  return $file;



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.