@@ -152,10 +152,10 @@ |
||
| 152 | 152 | |
| 153 | 153 | $executable = new Executable\Tar($this->pathToTar); |
| 154 | 154 | $executable->archiveDirectory($this->path) |
| 155 | - ->useCompression($this->compression) |
|
| 156 | - ->ignoreFailedRead($this->ignoreFailedRead) |
|
| 157 | - ->removeSourceDirectory($this->removeSourceDir) |
|
| 158 | - ->archiveTo($this->pathToArchive); |
|
| 155 | + ->useCompression($this->compression) |
|
| 156 | + ->ignoreFailedRead($this->ignoreFailedRead) |
|
| 157 | + ->removeSourceDirectory($this->removeSourceDir) |
|
| 158 | + ->archiveTo($this->pathToArchive); |
|
| 159 | 159 | return $executable; |
| 160 | 160 | } |
| 161 | 161 | |
@@ -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 | |
@@ -96,12 +96,12 @@ |
||
| 96 | 96 | ); |
| 97 | 97 | } else { |
| 98 | 98 | $executable->fromPath($this->getRsyncLocation($target)) |
| 99 | - ->toHost($this->host) |
|
| 100 | - ->toPath($this->path) |
|
| 101 | - ->toUser($this->user) |
|
| 102 | - ->compressed(!$target->shouldBeCompressed()) |
|
| 103 | - ->removeDeleted($this->delete) |
|
| 104 | - ->exclude($this->excludes); |
|
| 99 | + ->toHost($this->host) |
|
| 100 | + ->toPath($this->path) |
|
| 101 | + ->toUser($this->user) |
|
| 102 | + ->compressed(!$target->shouldBeCompressed()) |
|
| 103 | + ->removeDeleted($this->delete) |
|
| 104 | + ->exclude($this->excludes); |
|
| 105 | 105 | } |
| 106 | 106 | return $executable; |
| 107 | 107 | } |
@@ -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 | |
@@ -177,12 +177,12 @@ discard block |
||
| 177 | 177 | $info = $this->getInfoHtml($result); |
| 178 | 178 | $footer = $this->getFooterHtml(); |
| 179 | 179 | $body = '<html><body '. TPL::getSnippet('sBody') . '>' |
| 180 | - . $header |
|
| 181 | - . $status |
|
| 182 | - . $errors |
|
| 183 | - . $info |
|
| 184 | - . $footer |
|
| 185 | - . '</body></html>'; |
|
| 180 | + . $header |
|
| 181 | + . $status |
|
| 182 | + . $errors |
|
| 183 | + . $info |
|
| 184 | + . $footer |
|
| 185 | + . '</body></html>'; |
|
| 186 | 186 | $sent = null; |
| 187 | 187 | |
| 188 | 188 | try { |
@@ -309,7 +309,7 @@ discard block |
||
| 309 | 309 | |
| 310 | 310 | if ($username && $password) { |
| 311 | 311 | $transport->setUsername($username) |
| 312 | - ->setPassword($password); |
|
| 312 | + ->setPassword($password); |
|
| 313 | 313 | } |
| 314 | 314 | if ($encryption) { |
| 315 | 315 | $transport->setEncryption($encryption); |
@@ -342,7 +342,7 @@ discard block |
||
| 342 | 342 | protected function getHeaderHtml() |
| 343 | 343 | { |
| 344 | 344 | return '<table ' . TPL::getSnippet('sTableContent') . '><tr><td ' . TPL::getSnippet('sTableContentCol') . '>' . |
| 345 | - '<table ' . TPL::getSnippet('sTableHeader') . '><tr><td>PHPBU - backup report</td></tr></table>'; |
|
| 345 | + '<table ' . TPL::getSnippet('sTableHeader') . '><tr><td>PHPBU - backup report</td></tr></table>'; |
|
| 346 | 346 | } |
| 347 | 347 | |
| 348 | 348 | /** |
@@ -380,11 +380,11 @@ discard block |
||
| 380 | 380 | Str::appendPluralS('cleanup', $this->numCleanups) |
| 381 | 381 | ); |
| 382 | 382 | $html = '<table ' . sprintf(TPL::getSnippet('sTableStatus'), $color) .'>' . |
| 383 | - '<tr><td>' . |
|
| 384 | - '<span ' . TPL::getSnippet('sTableStatusText') . '>' . date('Y-m-d H:i') . '</span>' . |
|
| 385 | - '<h1 ' . TPL::getSnippet('sTableStatusHead') . '>' . $status . '</h1>' . |
|
| 386 | - '<span ' . TPL::getSnippet('sTableStatusText') . '>' . $info . '</span>' . |
|
| 387 | - '</td></tr>' . |
|
| 383 | + '<tr><td>' . |
|
| 384 | + '<span ' . TPL::getSnippet('sTableStatusText') . '>' . date('Y-m-d H:i') . '</span>' . |
|
| 385 | + '<h1 ' . TPL::getSnippet('sTableStatusHead') . '>' . $status . '</h1>' . |
|
| 386 | + '<span ' . TPL::getSnippet('sTableStatusText') . '>' . $info . '</span>' . |
|
| 387 | + '</td></tr>' . |
|
| 388 | 388 | '</table>'; |
| 389 | 389 | |
| 390 | 390 | return $html; |
@@ -445,65 +445,65 @@ discard block |
||
| 445 | 445 | $status = 'FAILURE'; |
| 446 | 446 | } |
| 447 | 447 | $html .= '<tr>' . |
| 448 | - '<td ' . sprintf(TPL::getSnippet('sTableBackupStatusColumn'), $color) . ' colspan="4">' . |
|
| 449 | - sprintf('backup <em>%s</em>', $backup->getName()) . |
|
| 450 | - ' <span ' . TPL::getSnippet('sTableBackupStatusText') . '>' . $status .'</span>'. |
|
| 451 | - '</td>' . |
|
| 452 | - '</tr>' . |
|
| 453 | - '<tr>' . |
|
| 454 | - '<td ' . TPL::getSnippet('sRowHead') . '> </td>' . |
|
| 455 | - '<td ' . TPL::getSnippet('sRowHead') . ' align="right">executed</td>' . |
|
| 456 | - '<td ' . TPL::getSnippet('sRowHead') . ' align="right">skipped</td>' . |
|
| 457 | - '<td ' . TPL::getSnippet('sRowHead') . ' align="right">failed</td>' . |
|
| 458 | - '</tr>'; |
|
| 448 | + '<td ' . sprintf(TPL::getSnippet('sTableBackupStatusColumn'), $color) . ' colspan="4">' . |
|
| 449 | + sprintf('backup <em>%s</em>', $backup->getName()) . |
|
| 450 | + ' <span ' . TPL::getSnippet('sTableBackupStatusText') . '>' . $status .'</span>'. |
|
| 451 | + '</td>' . |
|
| 452 | + '</tr>' . |
|
| 453 | + '<tr>' . |
|
| 454 | + '<td ' . TPL::getSnippet('sRowHead') . '> </td>' . |
|
| 455 | + '<td ' . TPL::getSnippet('sRowHead') . ' align="right">executed</td>' . |
|
| 456 | + '<td ' . TPL::getSnippet('sRowHead') . ' align="right">skipped</td>' . |
|
| 457 | + '<td ' . TPL::getSnippet('sRowHead') . ' align="right">failed</td>' . |
|
| 458 | + '</tr>'; |
|
| 459 | 459 | |
| 460 | 460 | $html .= '<tr>' . |
| 461 | - '<td ' . TPL::getSnippet('sRowCheck') . '>checks</td>' . |
|
| 462 | - '<td ' . TPL::getSnippet('sRowCheck') . ' align="right">' . |
|
| 461 | + '<td ' . TPL::getSnippet('sRowCheck') . '>checks</td>' . |
|
| 462 | + '<td ' . TPL::getSnippet('sRowCheck') . ' align="right">' . |
|
| 463 | 463 | $backup->checkCount() . ' |
| 464 | 464 | </td>' . |
| 465 | - '<td ' . TPL::getSnippet('sRowCheck') . ' align="right"> |
|
| 465 | + '<td ' . TPL::getSnippet('sRowCheck') . ' align="right"> |
|
| 466 | 466 | |
| 467 | 467 | </td>' . |
| 468 | - '<td ' . TPL::getSnippet('sRowCheck') . ' align="right">' . |
|
| 468 | + '<td ' . TPL::getSnippet('sRowCheck') . ' align="right">' . |
|
| 469 | 469 | $backup->checkCountFailed() . |
| 470 | - '</td>' . |
|
| 471 | - '</tr>' . |
|
| 472 | - '<tr>' . |
|
| 473 | - '<td ' . TPL::getSnippet('sRowCrypt') . '>crypts</td>' . |
|
| 474 | - '<td ' . TPL::getSnippet('sRowCrypt') . ' align="right">' . |
|
| 470 | + '</td>' . |
|
| 471 | + '</tr>' . |
|
| 472 | + '<tr>' . |
|
| 473 | + '<td ' . TPL::getSnippet('sRowCrypt') . '>crypts</td>' . |
|
| 474 | + '<td ' . TPL::getSnippet('sRowCrypt') . ' align="right">' . |
|
| 475 | 475 | $backup->cryptCount() . |
| 476 | - '</td>' . |
|
| 477 | - '<td ' . TPL::getSnippet('sRowCrypt') . ' align="right">' . |
|
| 476 | + '</td>' . |
|
| 477 | + '<td ' . TPL::getSnippet('sRowCrypt') . ' align="right">' . |
|
| 478 | 478 | $backup->cryptCountSkipped() . |
| 479 | - '</td>' . |
|
| 480 | - '<td ' . TPL::getSnippet('sRowCrypt') . ' align="right">' . |
|
| 479 | + '</td>' . |
|
| 480 | + '<td ' . TPL::getSnippet('sRowCrypt') . ' align="right">' . |
|
| 481 | 481 | $backup->cryptCountFailed() . |
| 482 | - '</td>' . |
|
| 483 | - '</tr>' . |
|
| 484 | - '<tr>' . |
|
| 485 | - '<td ' . TPL::getSnippet('sRowSync') . '>syncs</td>' . |
|
| 486 | - '<td ' . TPL::getSnippet('sRowSync') . ' align="right">' . |
|
| 482 | + '</td>' . |
|
| 483 | + '</tr>' . |
|
| 484 | + '<tr>' . |
|
| 485 | + '<td ' . TPL::getSnippet('sRowSync') . '>syncs</td>' . |
|
| 486 | + '<td ' . TPL::getSnippet('sRowSync') . ' align="right">' . |
|
| 487 | 487 | $backup->syncCount() . '</td>' . |
| 488 | - '<td ' . TPL::getSnippet('sRowSync') . ' align="right">' . |
|
| 488 | + '<td ' . TPL::getSnippet('sRowSync') . ' align="right">' . |
|
| 489 | 489 | $backup->syncCountSkipped() . |
| 490 | - '</td>' . |
|
| 491 | - '<td ' . TPL::getSnippet('sRowSync') . ' align="right">' . |
|
| 490 | + '</td>' . |
|
| 491 | + '<td ' . TPL::getSnippet('sRowSync') . ' align="right">' . |
|
| 492 | 492 | $backup->syncCountFailed() . |
| 493 | - '</td>' . |
|
| 494 | - '</tr>' . |
|
| 495 | - '<tr>' . |
|
| 496 | - '<td ' . TPL::getSnippet('sRowCleanup') . '>cleanups</td>' . |
|
| 497 | - '<td ' . TPL::getSnippet('sRowCleanup') . ' align="right">' . |
|
| 493 | + '</td>' . |
|
| 494 | + '</tr>' . |
|
| 495 | + '<tr>' . |
|
| 496 | + '<td ' . TPL::getSnippet('sRowCleanup') . '>cleanups</td>' . |
|
| 497 | + '<td ' . TPL::getSnippet('sRowCleanup') . ' align="right">' . |
|
| 498 | 498 | $backup->cleanupCount() . |
| 499 | - '</td>' . |
|
| 500 | - '<td ' . TPL::getSnippet('sRowCleanup') . ' align="right">' . |
|
| 499 | + '</td>' . |
|
| 500 | + '<td ' . TPL::getSnippet('sRowCleanup') . ' align="right">' . |
|
| 501 | 501 | $backup->cleanupCountSkipped() . |
| 502 | - '</td>' . |
|
| 503 | - '<td ' . TPL::getSnippet('sRowCleanup') . ' align="right">' . |
|
| 502 | + '</td>' . |
|
| 503 | + '<td ' . TPL::getSnippet('sRowCleanup') . ' align="right">' . |
|
| 504 | 504 | $backup->cleanupCountFailed() . |
| 505 | - '</td>' . |
|
| 506 | - '</tr>'; |
|
| 505 | + '</td>' . |
|
| 506 | + '</tr>'; |
|
| 507 | 507 | |
| 508 | 508 | } |
| 509 | 509 | $html .= '</table>'; |
@@ -519,6 +519,6 @@ discard block |
||
| 519 | 519 | protected function getFooterHtml() |
| 520 | 520 | { |
| 521 | 521 | return '<p ' . TPL::getSnippet('sStats') . '>' . PHP_Timer::resourceUsage() . '</p>' . |
| 522 | - '</td></tr></table>'; |
|
| 522 | + '</td></tr></table>'; |
|
| 523 | 523 | } |
| 524 | 524 | } |