public function backup_migrate_source_db::save_file in Backup and Migrate 7.3
Same name and namespace in other branches
- 8.3 includes/sources.db.inc \backup_migrate_source_db::save_file()
- 6.3 includes/sources.db.inc \backup_migrate_source_db::save_file()
Save the info by importing it into the database.
File
- includes/
sources.db.inc, line 28 - 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 save_file($file, $settings) {
require_once dirname(__FILE__) . '/files.inc';
// Set the source_id to the destination_id in the settings since for a
// restore, the source_id is the database that gets restored to.
$settings
->set_source($this
->get_id());
// Restore the file to the source database.
$file = backup_migrate_perform_restore($this
->get_id(), $file, $settings);
return $file;
}