コード例 #1
0
        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);
        }
コード例 #2
0
 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);
 }
コード例 #3
0
        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);
        }
コード例 #4
0
        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);
        }