示例#1
0
        public BackupProgress GetBackupProgress()
        {
            if (CoreBaseSettings.Standalone)
            {
                TenantExtra.DemandControlPanelPermission();
            }

            return(BackupHandler.GetBackupProgress());
        }
示例#2
0
        public BackupProgress StartBackup(Models.Backup backup)
        {
            if (CoreBaseSettings.Standalone)
            {
                TenantExtra.DemandControlPanelPermission();
            }

            BackupHandler.StartBackup(backup.StorageType, backup.StorageParams ?? new Dictionary <string, string>(), backup.BackupMail);
            return(BackupHandler.GetBackupProgress());
        }
示例#3
0
        public BackupProgress StartBackupRestore(BackupRestore backupRestore)
        {
            if (CoreBaseSettings.Standalone)
            {
                TenantExtra.DemandControlPanelPermission();
            }

            BackupHandler.StartRestore(backupRestore.BackupId, backupRestore.StorageType, backupRestore.StorageParams, backupRestore.Notify);
            return(BackupHandler.GetBackupProgress());
        }
示例#4
0
        private BackupProgress StartBackupRestore(BackupRestore backupRestore)
        {
            if (CoreBaseSettings.Standalone)
            {
                TenantExtra.DemandControlPanelPermission();
            }
            var storageParams = backupRestore.StorageParams == null ? new Dictionary <string, string>() : backupRestore.StorageParams.ToDictionary(r => r.Key.ToString(), r => r.Value.ToString());

            BackupHandler.StartRestore(backupRestore.BackupId, (BackupStorageType)Int32.Parse(backupRestore.StorageType.ToString()), storageParams, backupRestore.Notify);
            return(BackupHandler.GetBackupProgress());
        }
示例#5
0
        private BackupProgress StartBackup(Models.Backup backup)
        {
            if (CoreBaseSettings.Standalone)
            {
                TenantExtra.DemandControlPanelPermission();
            }
            var storageType   = backup.StorageType == null ? BackupStorageType.Documents : (BackupStorageType)Int32.Parse(backup.StorageType);
            var storageParams = backup.StorageParams == null ? new Dictionary <string, string>() : backup.StorageParams.ToDictionary(r => r.Key.ToString(), r => r.Value.ToString());

            BackupHandler.StartBackup(storageType, storageParams, backup.BackupMail);
            return(BackupHandler.GetBackupProgress());
        }