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