예제 #1
0
 public function didCountFilesInsideArchive($count)
 {
     $this->totalBackupFilesCount = $count;
     SGBackupLog::write('Number of files to restore: ' . $count);
 }
예제 #2
0
 private function resetBackupProgress()
 {
     $this->totalRowCount = 0;
     $this->currentRowCount = 0;
     $tableNames = $this->getTables();
     foreach ($tableNames as $table) {
         $this->totalRowCount += $this->getTableRowsCount($table);
     }
     $this->nextProgressUpdate = $this->progressUpdateInterval;
     SGBackupLog::write('Total tables to backup: ' . count($tableNames));
     SGBackupLog::write('Total rows to backup: ' . $this->totalRowCount);
 }
예제 #3
0
 private function resetBackupProgress()
 {
     $this->totalRowCount = 0;
     $this->currentRowCount = 0;
     $this->progressUpdateInterval = SGConfig::get('SG_ACTION_PROGRESS_UPDATE_INTERVAL');
     $tableNames = $this->getTables();
     foreach ($tableNames as $table) {
         $this->totalRowCount += $this->getTableRowsCount($table);
     }
     $this->nextProgressUpdate = $this->progressUpdateInterval;
     SGBackupLog::write('Total tables to backup: ' . count($tableNames));
     SGBackupLog::write('Total rows to backup: ' . $this->totalRowCount);
 }
예제 #4
0
파일: SGBackup.php 프로젝트: Finzy/stageDB
 private function didFinishRestore()
 {
     $action = $this->didFindWarnings() ? SG_ACTION_STATUS_FINISHED_WARNINGS : SG_ACTION_STATUS_FINISHED;
     self::changeActionStatus($this->actionId, $action);
     SGBackupLog::writeAction('restore', SG_BACKUP_LOG_POS_END);
     if (SGBoot::isFeatureAvailable('NOTIFICATIONS')) {
         SGBackupMailNotification::sendRestoreNotification(true);
     }
     SGBackupLog::write('Total duration: ' . formattedDuration($this->actionStartTs, time()));
     $this->cleanUp();
 }