Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions SemanticBackup.Core/Models/BackupRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class BackupRecord
[Required]
public string BackupDatabaseInfoId { get; set; }
public string Name { get; set; }
public string BackupStatus { get; set; } = BackupRecordBackupStatus.QUEUED.ToString();
public string BackupStatus { get; set; } = BackupRecordStatus.QUEUED.ToString();
[Required]
public string Path { get; set; }
public DateTime StatusUpdateDateUTC { get; set; } = DateTime.UtcNow;
Expand All @@ -24,7 +24,8 @@ public class BackupRecord
public string RestoreExecutionMessage { get; set; } = string.Empty;
public string RestoreConfirmationToken { get; set; } = string.Empty;
}
public enum BackupRecordBackupStatus

public enum BackupRecordStatus
{
QUEUED,
EXECUTING,
Expand All @@ -33,6 +34,7 @@ public enum BackupRecordBackupStatus
READY,
ERROR
}

public enum BackupRecordExecutedDeliveryRunStatus
{
PENDING_EXECUTION,
Expand Down
12 changes: 12 additions & 0 deletions SemanticBackup.Core/Models/Requests/RSSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,22 @@ public class RSDropBoxSetting
public string AccessToken { get; set; }
public string Directory { get; set; } = "/";
}

public class RSAzureBlobStorageSetting
{
public bool IsEnabled { get; set; } = false;
public string ConnectionString { get; set; }
public string BlobContainer { get; set; }
}

public class RSObjectStorageSetting
{
public bool IsEnabled { get; set; } = false;
public string Server { get; set; } = "localhost";
public int Port { get; set; } = 9000;
public string Bucket { get; set; } = "backups";
public string AccessKey { get; set; } = string.Empty;
public string SecretKey { get; set; } = string.Empty;
public bool UseSsl { get; set; } = false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public class ResourceGroupRequest
public RSEmailSMTPSetting RSEmailSMTPSetting { get; set; } = null;
public RSDropBoxSetting RSDropBoxSetting { get; set; } = null;
public RSAzureBlobStorageSetting RSAzureBlobStorageSetting { get; set; } = null;
public RSObjectStorageSetting RSObjectStorageSetting { get; set; } = null;
public bool NotifyOnErrorBackups { get; set; } = false;
public bool NotifyOnErrorBackupDelivery { get; set; } = false;
public string NotifyEmailDestinations { get; set; } = null;
Expand Down
20 changes: 19 additions & 1 deletion SemanticBackup.Core/Models/ResourceGroup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,23 @@ public class ResourceGroup
public bool NotifyOnErrorBackupDelivery { get; set; } = false;
public string NotifyEmailDestinations { get; set; } = null;
}

public class BackupDeliveryConfig
{
public DownloadLinkDeliveryConfig DownloadLink { get; set; } = new DownloadLinkDeliveryConfig();
public FtpDeliveryConfig Ftp { get; set; } = new FtpDeliveryConfig();
public SmtpDeliveryConfig Smtp { get; set; } = new SmtpDeliveryConfig();
public DropboxDeliveryConfig Dropbox { get; set; } = new DropboxDeliveryConfig();
public AzureBlobStorageDeliveryConfig AzureBlobStorage { get; set; } = new AzureBlobStorageDeliveryConfig();
public ObjectStorageDeliveryConfig ObjectStorage { get; set; } = new ObjectStorageDeliveryConfig();
}

public class DownloadLinkDeliveryConfig
{
public bool IsEnabled { get; set; } = true;
public string DownloadLinkType { get; set; }
}

public class FtpDeliveryConfig
{
public bool IsEnabled { get; set; } = false;
Expand All @@ -51,6 +55,7 @@ public class FtpDeliveryConfig
public string Password { get; set; }
public string Directory { get; set; } = "/";
}

public class SmtpDeliveryConfig
{
public bool IsEnabled { get; set; } = false;
Expand All @@ -62,6 +67,7 @@ public class SmtpDeliveryConfig
public string SMTPDefaultSMTPFromName { get; set; }
public string SMTPDestinations { get; set; }
}

public class DropboxDeliveryConfig
{
public bool IsEnabled { get; set; } = false;
Expand All @@ -74,13 +80,25 @@ public class AzureBlobStorageDeliveryConfig
public string ConnectionString { get; set; }
public string BlobContainer { get; set; }
}

public class ObjectStorageDeliveryConfig
{
public bool IsEnabled { get; set; } = false;
public string Server { get; set; } = "localhost";
public int Port { get; set; } = 9000;
public string Bucket { get; set; } = "buckups";
public string AccessKey { get; set; } = string.Empty;
public string SecretKey { get; set; } = string.Empty;
public bool UseSsl { get; set; } = false;
}

//enums
public enum DbTypes
{
SQLSERVER2019, SQLSERVER2014, SQLSERVER2012, MARIADBDATABASE, MYSQLDATABASE
}
public enum BackupDeliveryConfigTypes
{
DownloadLink, Ftp, Smtp, Dropbox, AzureBlobStorage
DownloadLink, Ftp, Smtp, Dropbox, AzureBlobStorage, ObjectStorage
}
}
Loading
Loading