function backup_migrate_backup_submit in Backup and Migrate 6
Same name and namespace in other branches
- 5 backup_migrate.module \backup_migrate_backup_submit()
Submit the form. Save the values as defaults if desired and output the backup file.
File
- ./
backup_migrate.module, line 307 - Create (manually or scheduled) and restore backups of your Drupal MySQL database with an option to exclude table data (f.e. cache_*)
Code
function backup_migrate_backup_submit($form, &$form_state) {
if ($form_state['values']['backup_migrate_save_settings']) {
variable_set("backup_migrate_exclude_tables", $form_state['values']['backup_migrate_exclude_tables']);
variable_set("backup_migrate_nodata_tables", $form_state['values']['backup_migrate_nodata_tables']);
variable_set("backup_migrate_file_name", $form_state['values']['backup_migrate_file_name']);
variable_set("backup_migrate_destination", $form_state['values']['backup_migrate_destination']);
variable_set("backup_migrate_compression", $form_state['values']['backup_migrate_compression']);
variable_set("backup_migrate_append_timestamp", $form_state['values']['backup_migrate_append_timestamp']);
variable_set("backup_migrate_timestamp_format", $form_state['values']['backup_migrate_timestamp_format']);
}
$out = _backup_migrate_dump_tables($form_state['values']['backup_migrate_file_name'], $form_state['values']['backup_migrate_exclude_tables'], $form_state['values']['backup_migrate_nodata_tables'], 'sql', $form_state['values']['backup_migrate_destination'], $form_state['values']['backup_migrate_compression'], "manual", $form_state['values']['backup_migrate_append_timestamp'] ? $form_state['values']['backup_migrate_timestamp_format'] : FALSE);
$form_state['redirect'] = $out;
}