public BackupProgress GetBackupProgress() { if (CoreBaseSettings.Standalone) { TenantExtra.DemandControlPanelPermission(); } return(BackupHandler.GetBackupProgress()); }
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()); }
public BackupProgress StartBackupRestore(BackupRestore backupRestore) { if (CoreBaseSettings.Standalone) { TenantExtra.DemandControlPanelPermission(); } BackupHandler.StartRestore(backupRestore.BackupId, backupRestore.StorageType, backupRestore.StorageParams, backupRestore.Notify); return(BackupHandler.GetBackupProgress()); }
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()); }
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()); }