Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
32 | public function restore() |
||
33 | { |
||
34 | $mysqlPath = $this->module->binaries['mysql']; |
||
35 | $zcatPath = $this->module->binaries['zcat']; |
||
36 | $this->checkBinary($zcatPath); |
||
37 | $this->checkBinary($mysqlPath); |
||
38 | $command = "{$zcatPath} {$this->backupFilePath} | {$mysqlPath} -h {$this->host} -P {$this->port} -u {$this->username} -p{$this->password} {$this->database}"; |
||
39 | exec($command, $return); |
||
40 | if (!empty($return)) |
||
41 | throw new PostgresDumpException(); |
||
42 | } |
||
44 |