Ecng.Backup.Azure
1.0.65
See the version list below for details.
dotnet add package Ecng.Backup.Azure --version 1.0.65
NuGet\Install-Package Ecng.Backup.Azure -Version 1.0.65
<PackageReference Include="Ecng.Backup.Azure" Version="1.0.65" />
<PackageVersion Include="Ecng.Backup.Azure" Version="1.0.65" />
<PackageReference Include="Ecng.Backup.Azure" />
paket add Ecng.Backup.Azure --version 1.0.65
#r "nuget: Ecng.Backup.Azure, 1.0.65"
#:package Ecng.Backup.Azure@1.0.65
#addin nuget:?package=Ecng.Backup.Azure&version=1.0.65
#tool nuget:?package=Ecng.Backup.Azure&version=1.0.65
Ecng.Backup.Azure
Azure Blob Storage backup provider implementing IBackupService.
Overview
AzureBlobService provides cloud backup capabilities using Microsoft Azure Blob Storage. It uses block blobs with chunked uploads for reliable large file transfers.
Usage
Creating the Service
using Ecng.Backup;
using Ecng.Backup.Azure;
var azure = new AzureBlobService(
connectionString: "DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=...;EndpointSuffix=core.windows.net",
container: "my-backup-container"
);
// Container is created automatically if it doesn't exist
Features
| Feature | Supported |
|---|---|
| CanPublish | No |
| CanExpirable | No |
| CanFolders | No (virtual via path prefixes) |
| CanPartialDownload | Yes |
Uploading Files
var entry = new BackupEntry { Name = "backups/database/2024-01-15.bak" };
await using var stream = File.OpenRead(@"C:\backups\database.bak");
await azure.UploadAsync(entry, stream, progress =>
{
Console.WriteLine($"Upload: {progress}%");
});
// Uses 4MB block chunks for reliable uploads
Downloading Files
var entry = new BackupEntry { Name = "backups/database/2024-01-15.bak" };
await using var stream = File.Create(@"C:\restore\database.bak");
await azure.DownloadAsync(entry, stream, null, null, progress =>
{
Console.WriteLine($"Download: {progress}%");
});
Partial Download (Resume Support)
var entry = new BackupEntry { Name = "large-file.zip" };
// Get total size
await azure.FillInfoAsync(entry);
// Download specific range
long offset = 1024 * 1024 * 100; // Start at 100MB
long length = 1024 * 1024 * 50; // Download 50MB
await using var stream = new MemoryStream();
await azure.DownloadAsync(entry, stream, offset, length, p => { });
Listing Blobs
// List all blobs with prefix
var folder = new BackupEntry { Name = "backups/2024" };
await foreach (var blob in azure.FindAsync(folder, criteria: null))
{
Console.WriteLine($"{blob.GetFullPath()}: {blob.Size} bytes");
Console.WriteLine($" Last modified: {blob.LastModified}");
}
// Search with filter
await foreach (var blob in azure.FindAsync(null, criteria: ".bak"))
{
Console.WriteLine(blob.Name);
}
Deleting Blobs
var entry = new BackupEntry { Name = "backups/old-backup.zip" };
await azure.DeleteAsync(entry);
Getting Blob Info
var entry = new BackupEntry { Name = "backups/data.zip" };
await azure.FillInfoAsync(entry);
Console.WriteLine($"Size: {entry.Size}");
Console.WriteLine($"Modified: {entry.LastModified}");
Connection String
Get your connection string from Azure Portal:
- Go to your Storage Account
- Select "Access keys" under Security + networking
- Copy the "Connection string"
Example format:
DefaultEndpointsProtocol=https;AccountName=mystorageaccount;AccountKey=abc123...==;EndpointSuffix=core.windows.net
NuGet
Install-Package Ecng.Backup.Azure
Dependencies
- Azure.Storage.Blobs
- Ecng.Backup
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Azure.Storage.Blobs (>= 12.27.0)
- Ecng.Backup (>= 1.0.266)
-
net6.0
- Azure.Storage.Blobs (>= 12.27.0)
- Ecng.Backup (>= 1.0.266)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Ecng.Backup.Azure:
| Package | Downloads |
|---|---|
|
StockSharp.Hydra.Core
Hydra core components. More info on web site https://stocksharp.com/store/ |
|
|
Ecng.Backup.All
Ecng system framework |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.68 | 112 | 5/15/2026 |
| 1.0.67 | 113 | 5/14/2026 |
| 1.0.66 | 116 | 5/3/2026 |
| 1.0.65 | 159 | 4/14/2026 |
| 1.0.64 | 172 | 3/17/2026 |
| 1.0.63 | 155 | 3/17/2026 |
| 1.0.62 | 148 | 3/15/2026 |
| 1.0.61 | 134 | 3/3/2026 |
| 1.0.60 | 137 | 2/28/2026 |
| 1.0.59 | 172 | 2/4/2026 |
| 1.0.58 | 145 | 2/1/2026 |
| 1.0.57 | 195 | 1/22/2026 |
| 1.0.56 | 166 | 1/19/2026 |
| 1.0.55 | 173 | 1/18/2026 |
| 1.0.54 | 145 | 1/18/2026 |
| 1.0.53 | 150 | 1/14/2026 |
| 1.0.52 | 142 | 1/13/2026 |
| 1.0.51 | 146 | 1/13/2026 |
| 1.0.50 | 169 | 1/9/2026 |
| 1.0.49 | 143 | 1/9/2026 |
Add missing .NoWait() / ConfigureAwait(false) in library code
Fix resource leaks in AzureBlobService, YandexDiskService, WebSocketClient