Conditions | 2 |
Paths | 2 |
Total Lines | 7 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
26 | public function restore(array $tableNames = []): void |
||
27 | { |
||
28 | $binaryPath = $this->module->binaries['pg_restore']; |
||
29 | $command = "PGPASSWORD='{$this->password}' {$binaryPath} -c -Fc -j 4 -h {$this->host} -p {$this->port} -U {$this->username} -d {$this->database} {$this->backupFilePath}"; |
||
30 | exec($command, $return); |
||
31 | if (!empty($return)) |
||
32 | throw new PostgresDumpException(); |
||
33 | } |
||
40 |