public override void RunJob() { Logger.DebugFormat("begin backup {0}", TenantId); CoreContext.TenantManager.SetCurrentTenant(TenantId); using (var writer = new ZipWriteOperator(BackupFilePath)) { if (Dump) { DoDump(writer); } else { var dbFactory = new DbFactory(ConfigPath); var modulesToProcess = GetModulesToProcess().ToList(); var fileGroups = GetFilesGroup(dbFactory); var stepscount = ProcessStorage ? fileGroups.Count : 0; SetStepsCount(modulesToProcess.Count + stepscount); foreach (var module in modulesToProcess) { DoBackupModule(writer, dbFactory, module); } if (ProcessStorage) { DoBackupStorage(writer, fileGroups); } } } Logger.DebugFormat("end backup {0}", TenantId); }
public override void Run() { InvokeInfo("begin backup portal ({0})", Tenant.TenantAlias); List<IModuleSpecifics> modulesToProcess = GetModulesToProcess().ToList(); InitProgress(ProcessStorage ? modulesToProcess.Count + 1 : modulesToProcess.Count); using (var writer = new ZipWriteOperator(BackupFilePath)) { var dbFactory = new DbFactory(ConfigPath); foreach (var module in modulesToProcess) { DoBackupModule(writer, dbFactory, module); } if (ProcessStorage) { DoBackupStorage(writer); } } InvokeInfo("end backup portal ({0})", Tenant.TenantAlias); }
public override void RunJob() { Logger.Debug("begin backup {0}", TenantId); List <IModuleSpecifics> modulesToProcess = GetModulesToProcess().ToList(); SetStepsCount(ProcessStorage ? modulesToProcess.Count + 1 : modulesToProcess.Count); using (var writer = new ZipWriteOperator(BackupFilePath)) { var dbFactory = new DbFactory(ConfigPath); foreach (var module in modulesToProcess) { DoBackupModule(writer, dbFactory, module); } if (ProcessStorage) { DoBackupStorage(writer, dbFactory); } } Logger.Debug("end backup {0}", TenantId); }
public override void Run() { InvokeInfo("begin backup portal ({0})", Tenant.TenantAlias); List <IModuleSpecifics> modulesToProcess = GetModulesToProcess().ToList(); InitProgress(ProcessStorage ? modulesToProcess.Count + 1 : modulesToProcess.Count); using (var writer = new ZipWriteOperator(BackupFilePath)) { var dbFactory = new DbFactory(ConfigPath); foreach (var module in modulesToProcess) { DoBackupModule(writer, dbFactory, module); } if (ProcessStorage) { DoBackupStorage(writer); } } InvokeInfo("end backup portal ({0})", Tenant.TenantAlias); }