| @@ 127-138 (lines=12) @@ | ||
| 124 | * @return \phpbu\App\Cli\Executable |
|
| 125 | * @throws \phpbu\App\Exception |
|
| 126 | */ |
|
| 127 | public function getExecutable(Target $target) |
|
| 128 | { |
|
| 129 | if (null == $this->executable) { |
|
| 130 | $this->executable = new Executable\Elasticdump($this->pathToElasticdump); |
|
| 131 | $this->executable->useHost($this->host) |
|
| 132 | ->credentials($this->user, $this->password) |
|
| 133 | ->dumpIndex($this->index) |
|
| 134 | ->dumpType($this->type) |
|
| 135 | ->dumpTo($target->getPathnamePlain()); |
|
| 136 | } |
|
| 137 | return $this->executable; |
|
| 138 | } |
|
| 139 | ||
| 140 | /** |
|
| 141 | * Create backup status. |
|
| @@ 139-152 (lines=14) @@ | ||
| 136 | * @return \phpbu\App\Cli\Executable |
|
| 137 | * @throws \phpbu\App\Exception |
|
| 138 | */ |
|
| 139 | public function getExecutable(Target $target) |
|
| 140 | { |
|
| 141 | if (null == $this->executable) { |
|
| 142 | $this->executable = new Executable\Innobackupex($this->pathToXtraBackup); |
|
| 143 | $this->executable->useHost($this->host) |
|
| 144 | ->credentials($this->user, $this->password) |
|
| 145 | ->dumpDatabases($this->databases) |
|
| 146 | ->including($this->include) |
|
| 147 | ->dumpFrom($this->dataDir) |
|
| 148 | ->dumpTo($this->getDumpDir($target)); |
|
| 149 | } |
|
| 150 | ||
| 151 | return $this->executable; |
|
| 152 | } |
|
| 153 | ||
| 154 | /** |
|
| 155 | * Create backup status. |
|