function backup_migrate_destination_db::backup_settings_form in Backup and Migrate 6.2
Same name and namespace in other branches
- 8.2 includes/destinations.db.inc \backup_migrate_destination_db::backup_settings_form()
- 8.3 includes/destinations.db.inc \backup_migrate_destination_db::backup_settings_form()
- 7.3 includes/destinations.db.inc \backup_migrate_destination_db::backup_settings_form()
- 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_destination::backup_settings_form
File
- includes/
destinations.db.inc, line 104 - 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" => array_filter($settings['exclude_tables']),
'#element_validate' => array(
'_backup_migrate_destination_complete_table_list',
),
"#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" => array_filter($settings['nodata_tables']),
'#element_validate' => array(
'_backup_migrate_destination_complete_table_list',
),
"#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;
}