Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
12 | public function backup() |
||
13 | { |
||
14 | $binaryPath = $this->module->binaries['pg_dump']; |
||
15 | $ionicePath = $this->module->binaries['ionice']; |
||
16 | $command = "PGPASSWORD='{$this->password}' {$ionicePath} -c{$this->io} {$binaryPath} -h {$this->host} -p {$this->port} -U {$this->username} -Fc -Z1 {$this->database} -f {$this->backupFilePath}"; |
||
17 | exec($command, $return); |
||
18 | if (!empty($return)) |
||
19 | throw new PostgresDumpException(); |
||
20 | } |
||
36 |