@@ -116,9 +116,9 @@ |
||
116 | 116 | try { |
117 | 117 | /** @var \ObjectStorage_Container $container */ |
118 | 118 | $container = $objectStorage->with($this->container . $targetPath) |
119 | - ->setLocalFile($sourcePath) |
|
120 | - ->setMeta('description', 'PHPBU Backup: ' . date('r', time())) |
|
121 | - ->setHeader('Content-Type', $target->getMimeType()); |
|
119 | + ->setLocalFile($sourcePath) |
|
120 | + ->setMeta('description', 'PHPBU Backup: ' . date('r', time())) |
|
121 | + ->setHeader('Content-Type', $target->getMimeType()); |
|
122 | 122 | $container->create(); |
123 | 123 | } catch (\Exception $e) { |
124 | 124 | throw new Exception($e->getMessage(), null, $e); |
@@ -39,7 +39,7 @@ |
||
39 | 39 | */ |
40 | 40 | public function __construct(Runner $runner = null) |
41 | 41 | { |
42 | - $this->runner = $runner ? : new Runner\Simple(); |
|
42 | + $this->runner = $runner ?: new Runner\Simple(); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | /** |
@@ -176,13 +176,13 @@ |
||
176 | 176 | { |
177 | 177 | $executable = new Executable\Mongodump($this->pathToMongodump); |
178 | 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); |
|
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 | 186 | return $executable; |
187 | 187 | } |
188 | 188 |
@@ -74,11 +74,11 @@ |
||
74 | 74 | ); |
75 | 75 | } else { |
76 | 76 | $executable->fromHost($this->host) |
77 | - ->fromUser($this->user) |
|
78 | - ->fromPath($this->path) |
|
79 | - ->toPath($this->getRsyncLocation($target, true)) |
|
80 | - ->removeDeleted($this->delete) |
|
81 | - ->exclude($this->excludes); |
|
77 | + ->fromUser($this->user) |
|
78 | + ->fromPath($this->path) |
|
79 | + ->toPath($this->getRsyncLocation($target, true)) |
|
80 | + ->removeDeleted($this->delete) |
|
81 | + ->exclude($this->excludes); |
|
82 | 82 | } |
83 | 83 | return $executable; |
84 | 84 | } |
@@ -124,9 +124,9 @@ |
||
124 | 124 | { |
125 | 125 | $executable = new Executable\RedisCli($this->pathToRedisCli); |
126 | 126 | $executable->backup() |
127 | - ->useHost($this->host) |
|
128 | - ->usePort($this->port) |
|
129 | - ->usePassword($this->password); |
|
127 | + ->useHost($this->host) |
|
128 | + ->usePort($this->port) |
|
129 | + ->usePassword($this->password); |
|
130 | 130 | return $executable; |
131 | 131 | } |
132 | 132 |
@@ -262,20 +262,20 @@ |
||
262 | 262 | { |
263 | 263 | $executable = new Executable\Pgdump($this->pathToPgdump); |
264 | 264 | $executable->credentials($this->user, $this->password) |
265 | - ->useHost($this->host) |
|
266 | - ->usePort($this->port) |
|
267 | - ->dumpDatabase($this->database) |
|
268 | - ->dumpSchemas($this->schemas) |
|
269 | - ->excludeSchemas($this->excludeSchemas) |
|
270 | - ->dumpTables($this->tables) |
|
271 | - ->excludeTables($this->excludeTables) |
|
272 | - ->excludeTableData($this->excludeTableData) |
|
273 | - ->dumpSchemaOnly($this->schemaOnly) |
|
274 | - ->dumpDataOnly($this->dataOnly) |
|
275 | - ->dumpNoPrivileges($this->noPrivileges) |
|
276 | - ->dumpNoOwner($this->noOwner) |
|
277 | - ->dumpFormat($this->format) |
|
278 | - ->dumpTo($target->getPathnamePlain()); |
|
265 | + ->useHost($this->host) |
|
266 | + ->usePort($this->port) |
|
267 | + ->dumpDatabase($this->database) |
|
268 | + ->dumpSchemas($this->schemas) |
|
269 | + ->excludeSchemas($this->excludeSchemas) |
|
270 | + ->dumpTables($this->tables) |
|
271 | + ->excludeTables($this->excludeTables) |
|
272 | + ->excludeTableData($this->excludeTableData) |
|
273 | + ->dumpSchemaOnly($this->schemaOnly) |
|
274 | + ->dumpDataOnly($this->dataOnly) |
|
275 | + ->dumpNoPrivileges($this->noPrivileges) |
|
276 | + ->dumpNoOwner($this->noOwner) |
|
277 | + ->dumpFormat($this->format) |
|
278 | + ->dumpTo($target->getPathnamePlain()); |
|
279 | 279 | return $executable; |
280 | 280 | } |
281 | 281 |
@@ -140,11 +140,11 @@ |
||
140 | 140 | { |
141 | 141 | $executable = new Executable\Innobackupex($this->pathToXtraBackup); |
142 | 142 | $executable->useHost($this->host) |
143 | - ->credentials($this->user, $this->password) |
|
144 | - ->dumpDatabases($this->databases) |
|
145 | - ->including($this->include) |
|
146 | - ->dumpFrom($this->dataDir) |
|
147 | - ->dumpTo($this->getDumpDir($target)); |
|
143 | + ->credentials($this->user, $this->password) |
|
144 | + ->dumpDatabases($this->databases) |
|
145 | + ->including($this->include) |
|
146 | + ->dumpFrom($this->dataDir) |
|
147 | + ->dumpTo($this->getDumpDir($target)); |
|
148 | 148 | return $executable; |
149 | 149 | } |
150 | 150 |
@@ -161,13 +161,13 @@ |
||
161 | 161 | { |
162 | 162 | $executable = new Executable\Arangodump($this->pathToArangodump); |
163 | 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)); |
|
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 | 171 | return $executable; |
172 | 172 | } |
173 | 173 |
@@ -72,10 +72,10 @@ |
||
72 | 72 | $executable = new Tar($this->pathToCommand); |
73 | 73 | $executable->archiveDirectory($this->path); |
74 | 74 | $executable->archiveTo($this->getArchiveFile($target)) |
75 | - ->useCompression( |
|
76 | - $target->shouldBeCompressed() ? $target->getCompression()->getCommand() : '' |
|
77 | - ) |
|
78 | - ->removeSourceDirectory(true); |
|
75 | + ->useCompression( |
|
76 | + $target->shouldBeCompressed() ? $target->getCompression()->getCommand() : '' |
|
77 | + ) |
|
78 | + ->removeSourceDirectory(true); |
|
79 | 79 | return $executable; |
80 | 80 | } |
81 | 81 |