| @@ 160-172 (lines=13) @@ | ||
| 157 | * @return \phpbu\App\Cli\Executable |
|
| 158 | * @throws \phpbu\App\Exception |
|
| 159 | */ |
|
| 160 | protected function createExecutable(Target $target) : Executable |
|
| 161 | { |
|
| 162 | $executable = new Executable\Arangodump($this->pathToArangodump); |
|
| 163 | $executable->useEndpoint($this->endpoint) |
|
| 164 | ->credentials($this->username, $this->password) |
|
| 165 | ->dumpDatabase($this->database) |
|
| 166 | ->dumpCollections($this->collections) |
|
| 167 | ->disableAuthentication($this->disableAuthentication) |
|
| 168 | ->includeSystemCollections($this->includeSystemCollections) |
|
| 169 | ->dumpData($this->dumpData) |
|
| 170 | ->dumpTo($this->getDumpDir($target)); |
|
| 171 | return $executable; |
|
| 172 | } |
|
| 173 | ||
| 174 | /** |
|
| 175 | * Create backup status. |
|
| @@ 175-187 (lines=13) @@ | ||
| 172 | * @param \phpbu\App\Backup\Target $target |
|
| 173 | * @return \phpbu\App\Cli\Executable |
|
| 174 | */ |
|
| 175 | protected function createExecutable(Target $target) : Executable |
|
| 176 | { |
|
| 177 | $executable = new Executable\Mongodump($this->pathToMongodump); |
|
| 178 | $executable->dumpToDirectory($this->getDumpDir($target)) |
|
| 179 | ->useIpv6($this->useIPv6) |
|
| 180 | ->useHost($this->host) |
|
| 181 | ->credentials($this->user, $this->password, $this->authenticationDatabase) |
|
| 182 | ->dumpDatabases($this->databases) |
|
| 183 | ->dumpCollections($this->collections) |
|
| 184 | ->excludeCollections($this->excludeCollections) |
|
| 185 | ->excludeCollectionsWithPrefix($this->excludeCollectionsWithPrefix); |
|
| 186 | return $executable; |
|
| 187 | } |
|
| 188 | ||
| 189 | /** |
|
| 190 | * Create backup status. |
|