function backup_migrate_perform_backup

cis7 backup_migrate.module backup_migrate_perform_backup(&$settings)
cle7 backup_migrate.module backup_migrate_perform_backup(&$settings)
elmsmedia7 backup_migrate.module backup_migrate_perform_backup(&$settings)
icor7 backup_migrate.module backup_migrate_perform_backup(&$settings)
meedjum_blog7 backup_migrate.module backup_migrate_perform_backup(&$settings)
mooc7 backup_migrate.module backup_migrate_perform_backup(&$settings)

Perform a backup with the given settings.

4 calls to backup_migrate_perform_backup()
backup_migrate_drush_backup in sites/all/modules/ulmus/backup_migrate/includes/backup_migrate.drush.inc
Backup the default database.
backup_migrate_schedule::cron in sites/all/modules/ulmus/backup_migrate/includes/schedules.inc
Perform the cron action. Run the backup if enough time has elapsed.
backup_migrate_ui_manual_backup_perform in sites/all/modules/ulmus/backup_migrate/backup_migrate.module
_backup_migrate_backup_with_defaults in sites/all/modules/ulmus/backup_migrate/backup_migrate.module
Backup the database with the default settings.

File

sites/all/modules/ulmus/backup_migrate/backup_migrate.module, line 697
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_perform_backup(&$settings) {
  backup_migrate_include('destinations', 'files', 'filters');
  timer_start('backup_migrate_backup');

  // 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_backup_max_time', 1200)) {
    set_time_limit(variable_get('backup_migrate_backup_max_time', 1200));
  }

  $timestamp = '';
  if ($settings->append_timestamp && $settings->timestamp_format) {
    $timestamp = format_date(time(), 'custom', $settings->timestamp_format);
  }
  $filename = _backup_migrate_construct_filename($settings->filename, $timestamp);

  $file = new backup_file(array('filename' => $filename));
  if (!$file) {
    backup_migrate_backup_fail("Could not run backup because a temporary file could not be created.", array(), $settings);
    return FALSE;
  }

  // Register shutdown callback to deal with timeouts.
  register_shutdown_function('backup_migrate_shutdown', $settings);

  $file = backup_migrate_filters_backup($file, $settings);
  if (!$file) {
    if (_backup_migrate_check_timeout()) {
      backup_migrate_backup_fail('Could not complete the backup because the script timed out. Try increasing your PHP <a href="!url">max_execution_time setting</a>.', array('!url' => 'http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time'), $settings);
    }
    else {
      backup_migrate_backup_fail("Could not complete the backup.", array(), $settings);
    }
    return FALSE;
  }

  $file = backup_migrate_destination_save_file($file, $settings);
  if (!$file) {
    backup_migrate_backup_fail("Could not run backup because the file could not be saved to the destination.", array(), $settings);
    return FALSE;
  }

  // Backup succeeded, 
  $time = timer_stop('backup_migrate_backup');
  $message = '%source backed up successfully to %file in destination %dest in !time ms. !action';
  $params = array(
    '%file' => $filename,
    '%dest' => $settings->get_destination_name(),
    '%source' => $settings->get_source_name(),
    '!time' => $time['time'],
    '!action' => !empty($settings->performed_action) ? $settings->performed_action : '',
  );
  if (($destination = $settings->get_destination()) && ($links = $destination->get_file_links($file->file_id()))) {
    $params['!links'] = implode(", ", $links);
  }

  backup_migrate_backup_succeed($message, $params, $settings);
  return $file;
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.