public function backup_migrate_source_db::backup_to_file in Backup and Migrate 7.3
Same name and namespace in other branches
- 8.3 includes/sources.db.inc \backup_migrate_source_db::backup_to_file()
- 6.3 includes/sources.db.inc \backup_migrate_source_db::backup_to_file()
Backup from this source.
File
- includes/
sources.db.inc, line 152 - Functions to handle the direct to database destination.
Class
- backup_migrate_source_db
- A destination type for saving to a database server.
Code
public function backup_to_file($file, $settings) {
$file
->push_type($this
->get_file_type_id());
// $this->lock_tables($settings);
// Switch to a different db if specified.
if (variable_get('backup_migrate_verbose')) {
_backup_migrate_message('Start peak memory usage: %mem', array(
'%mem' => backup_migrate_get_peak_memory_usage() . 'MB',
), 'success');
}
$success = $this
->_backup_db_to_file($file, $settings);
if (variable_get('backup_migrate_verbose')) {
_backup_migrate_message('Finish peak memory usage: %mem', array(
'%mem' => backup_migrate_get_peak_memory_usage() . 'MB',
), 'success');
}
// $this->unlock_tables($settings);
return $success ? $file : FALSE;
}