public function didCountFilesInsideArchive($count) { $this->totalBackupFilesCount = $count; SGBackupLog::write('Number of files to restore: ' . $count); }
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); }
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); }
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(); }