function backup_migrate_ui_manual_restore_form

cis7 backup_migrate.module backup_migrate_ui_manual_restore_form()
cle7 backup_migrate.module backup_migrate_ui_manual_restore_form()
elmsmedia7 backup_migrate.module backup_migrate_ui_manual_restore_form()
icor7 backup_migrate.module backup_migrate_ui_manual_restore_form()
meedjum_blog7 backup_migrate.module backup_migrate_ui_manual_restore_form()
mooc7 backup_migrate.module backup_migrate_ui_manual_restore_form()

The restore/import upload form.

1 string reference to 'backup_migrate_ui_manual_restore_form'
backup_migrate_ui_manual_restore in sites/all/modules/ulmus/backup_migrate/backup_migrate.module
The restore/import upload page.

File

sites/all/modules/ulmus/backup_migrate/backup_migrate.module, line 618
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() {
  backup_migrate_include('filters', 'destinations');

  $form = array();

  $sources = _backup_migrate_get_destination_form_item_options('source');
  if (count($sources) > 1) {
    $form['source_id'] = array(
      "#type" => "select",
      "#title" => t("Restore to"),
      "#options" => _backup_migrate_get_destination_form_item_options('source'),
      "#description" => t("Choose the database to restore to. Any database destinations you have created and any databases specified in your settings.php can be restored to."),
      "#default_value" => 'db',
    );
  }
  else {
    $form['source_id'] = array(
      "#type" => "value",
      "#value" => 'db',
    );
  }

  $form['backup_migrate_restore_upload'] = array(
    '#title' => t('Upload a Backup File'),
    '#type' => 'file',
    '#description' => t("Upload a backup file created by this version of this module. For other database backups please use another tool for import. Max file size: %size", array("%size" => format_size(file_upload_max_size()))),
  );
  drupal_set_message(t('Restoring will delete some or all of your data and cannot be undone. <strong>Always test your backups on a non-production server!</strong>'), 'warning', FALSE);

  $form = array_merge_recursive($form, backup_migrate_filters_settings_form(backup_migrate_filters_settings_default('restore'), 'restore'));
  // Add the advanced fieldset if there are any fields in it.
  if (@$form['advanced']) {
    $form['advanced']['#type'] = 'fieldset';
    $form['advanced']['#title'] = t('Advanced Options');
    $form['advanced']['#collapsed'] = true;
    $form['advanced']['#collapsible'] = true;
  }

  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Restore now'),
  );
  if (user_access('access backup files')) {
    $form[] = array(
      '#type' => 'markup',
      '#markup' => t('<p>Or you can restore one of the files in your <a href="!url">saved backup destinations.</a></p>', array("!url" => url(BACKUP_MIGRATE_MENU_PATH . "/destination"))),
    );
  }
  $form['#attributes'] = array('enctype' => 'multipart/form-data');
  return $form;
}
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.