Ecng.Backup.Azure 1.0.47

There is a newer version of this package available.
See the version list below for details.
dotnet add package Ecng.Backup.Azure --version 1.0.47
                    
NuGet\Install-Package Ecng.Backup.Azure -Version 1.0.47
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Ecng.Backup.Azure" Version="1.0.47" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Ecng.Backup.Azure" Version="1.0.47" />
                    
Directory.Packages.props
<PackageReference Include="Ecng.Backup.Azure" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Ecng.Backup.Azure --version 1.0.47
                    
#r "nuget: Ecng.Backup.Azure, 1.0.47"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Ecng.Backup.Azure@1.0.47
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Ecng.Backup.Azure&version=1.0.47
                    
Install as a Cake Addin
#tool nuget:?package=Ecng.Backup.Azure&version=1.0.47
                    
Install as a Cake Tool

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:

  1. Go to your Storage Account
  2. Select "Access keys" under Security + networking
  3. 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.62 28 3/15/2026
1.0.61 111 3/3/2026
1.0.60 117 2/28/2026
1.0.59 152 2/4/2026
1.0.58 124 2/1/2026
1.0.57 176 1/22/2026
1.0.56 145 1/19/2026
1.0.55 150 1/18/2026
1.0.54 125 1/18/2026
1.0.53 128 1/14/2026
1.0.52 123 1/13/2026
1.0.51 123 1/13/2026
1.0.50 153 1/9/2026
1.0.49 124 1/9/2026
1.0.48 127 1/4/2026
1.0.47 117 12/30/2025
1.0.46 108 12/29/2025
1.0.45 111 12/26/2025
1.0.44 95 12/26/2025
1.0.43 95 12/26/2025
Loading failed