public function BackupDatabaseRemoteAdapter::export in Backup Database 8
Export method.
Overrides BackupDatabaseAdapterInterface::export
File
- src/
Adapter/ BackupDatabaseRemoteAdapter.php, line 36 - Contains \Drupal\backup_db\Adapter\BackupDatabaseRemoteAdapter
Class
- BackupDatabaseRemoteAdapter
- BackupDatabaseRemoteAdapter class.
Namespace
Drupal\backup_db\AdapterCode
public function export() {
$handler = $this->client
->getFileHandler();
$handler
->setupFile($this->client
->getSettings());
// @todo, run file validation here.
$file = $handler
->getFile();
$export = $this->client
->dump();
$export
->start($file
->getFileUri());
$this
->download($file
->getFileUri(), [
'name' => $file
->getFileName(),
'type' => $file
->getFileType(),
]);
return TRUE;
}