Skip to content

Commit e5b15b9

Browse files
author
Alex Schulte
committed
additional mysqldump options added
1 parent e1d5cfd commit e5b15b9

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Classes/Step/MysqlTableExportStep.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,19 @@ class MysqlTableExportStep extends StepAbstract
2121
public function backup(): bool
2222
{
2323
$mysqlDumpPath = $this->config['mysqlDumpBinPath'] ?? 'mysqldump';
24+
$mysqlDumpOptions = $this->config['mysqlDumpOptions'] ?? [];
2425
$backupPath = $this->getBackupStepPath();
2526

2627
foreach ($this->config['tables'] as $table) {
2728
$outputFileName = $backupPath.'/'.$table.'.sql';
28-
$command = vsprintf('%s -h %s -u %s -p%s %s %s 2>/dev/null 1> %s', [
29+
$command = vsprintf('%s -h %s -u %s -p%s %s %s %s 2>/dev/null 1> %s', [
2930
$mysqlDumpPath,
3031
escapeshellarg($this->dbConfig['host']),
3132
escapeshellarg($this->dbConfig['user']),
3233
escapeshellarg($this->dbConfig['password']),
3334
escapeshellarg($this->dbConfig['dbname']),
3435
$table,
36+
implode(' ', $mysqlDumpOptions),
3537
$outputFileName
3638
]);
3739
exec($command);

Documentation/steps.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* [File/Directory copy step](#file-directory-copy-step)
44
* [Site export step](#site-export-step)
55
* [MySQL table export step](#mysql-table-export-step)
6+
* [MySQL database export step](#mysql-database-export-step)
67

78

89
## File export step
@@ -46,7 +47,7 @@ Breadlesscode:
4647
- neos_flow_security_account
4748
```
4849

49-
## MySql-Database export step
50+
## MySQL database export step
5051

5152
This step exports a whole MySql-Database via the `mysqldump`-Binary.
5253

0 commit comments

Comments
 (0)