You are here

function backup_migrate_destination_db::backup_settings_form in Backup and Migrate 8.3

Same name and namespace in other branches
  1. 8.2 includes/destinations.db.inc \backup_migrate_destination_db::backup_settings_form()
  2. 6.2 includes/destinations.db.inc \backup_migrate_destination_db::backup_settings_form()
  3. 7.3 includes/destinations.db.inc \backup_migrate_destination_db::backup_settings_form()
  4. 7.2 includes/destinations.db.inc \backup_migrate_destination_db::backup_settings_form()

Get the form for the backup settings for this destination.

Overrides backup_migrate_location::backup_settings_form

1 call to backup_migrate_destination_db::backup_settings_form()
backup_migrate_destination_db_mysql::backup_settings_form in includes/destinations.db.mysql.inc
Get the form for the backup settings for this destination.
1 method overrides backup_migrate_destination_db::backup_settings_form()
backup_migrate_destination_db_mysql::backup_settings_form in includes/destinations.db.mysql.inc
Get the form for the backup settings for this destination.

File

includes/destinations.db.inc, line 114
Functions to handle the direct to database destination.

Class

backup_migrate_destination_db
A destination type for saving to a database server.

Code

function backup_settings_form($settings) {
  $objects = $this
    ->get_object_names();
  $form['#description'] = t("You may omit specific tables, or specific table data from the backup file. Only omit data that you know you will not need such as cache data, or tables from other applications. Excluding tables can break your Drupal install, so <strong>do not change these settings unless you know what you're doing</strong>.");
  $form['exclude_tables'] = array(
    "#type" => "select",
    "#multiple" => TRUE,
    "#title" => t("Exclude the following tables altogether"),
    "#options" => $objects,
    "#default_value" => $settings['exclude_tables'],
    "#description" => t("The selected tables will not be added to the backup file."),
  );
  $tables = $this
    ->get_table_names();
  $form['nodata_tables'] = array(
    "#type" => "select",
    "#multiple" => TRUE,
    "#title" => t("Exclude the data from the following tables"),
    "#options" => $tables,
    "#default_value" => $settings['nodata_tables'],
    "#description" => t("The selected tables will have their structure backed up but not their contents. This is useful for excluding cache data to reduce file size."),
  );
  $form['utils_lock_tables'] = array(
    '#type' => 'checkbox',
    '#title' => t('Lock tables during backup'),
    '#default_value' => !empty($settings['utils_lock_tables']) ? $settings['utils_lock_tables'] : NULL,
    '#description' => t('This can help reduce data corruption, but will make your site unresponsive.'),
  );
  return $form;
}