Ecng.Backup.AWS 1.0.170

dotnet add package Ecng.Backup.AWS --version 1.0.170
 
NuGet\Install-Package Ecng.Backup.AWS -Version 1.0.170
 
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.AWS" Version="1.0.170" />
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Ecng.Backup.AWS" Version="1.0.170" />
 
Directory.Packages.props
<PackageReference Include="Ecng.Backup.AWS" />
 
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.AWS --version 1.0.170
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Ecng.Backup.AWS, 1.0.170"
 
#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.AWS@1.0.170
 
#: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.AWS&version=1.0.170
 
Install as a Cake Addin
#tool nuget:?package=Ecng.Backup.AWS&version=1.0.170
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Ecng.Backup.AWS

Amazon Web Services backup providers implementing IBackupService. Supports both Amazon S3 for frequent access and Amazon Glacier for archival storage.

Services

AmazonS3Service

High-performance object storage for frequently accessed data.

using Ecng.Backup;
using Ecng.Backup.Amazon;
// Create service using region name
var s3 = new AmazonS3Service(
 endpoint: "us-east-1", // or "eu-west-1", "ap-northeast-1", etc.
 bucket: "my-backup-bucket",
 accessKey: "AKIAIOSFODNN7EXAMPLE",
 secretKey: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
);
// Or using RegionEndpoint directly
var s3 = new AmazonS3Service(
 endpoint: RegionEndpoint.USEast1,
 bucket: "my-backup-bucket",
 accessKey: "...",
 secretKey: "..."
);
Features
Feature Supported
CanPublish Yes
CanExpirable Yes (up to 7 days)
CanFolders No (virtual via path prefixes)
CanPartialDownload Yes
Upload with Progress
var entry = new BackupEntry { Name = "backups/2024/data.zip" };
await using var fileStream = File.OpenRead(@"C:\data.zip");
await s3.UploadAsync(entry, fileStream, progress =>
{
 Console.WriteLine($"Uploaded: {progress}%");
});
Download with Resume Support
var entry = new BackupEntry { Name = "backups/2024/data.zip" };
// Get file info first
await s3.FillInfoAsync(entry);
Console.WriteLine($"File size: {entry.Size} bytes");
// Resume download from offset
long alreadyDownloaded = new FileInfo("data.zip.partial").Length;
long remaining = entry.Size - alreadyDownloaded;
await using var stream = new FileStream("data.zip.partial", FileMode.Append);
await s3.DownloadAsync(entry, stream, alreadyDownloaded, remaining,
 progress => Console.WriteLine($"Progress: {progress}%"));
Publishing Files
var entry = new BackupEntry { Name = "reports/monthly.pdf" };
// Permanent public URL (requires bucket ACL permissions)
string permanentUrl = await s3.PublishAsync(entry);
// Pre-signed URL with expiration (works with any bucket)
string tempUrl = await s3.PublishAsync(entry, TimeSpan.FromHours(24));
// Maximum expiration: 7 days
// Revoke public access
await s3.UnPublishAsync(entry);
Listing Files
// List all files in a "folder"
var folder = new BackupEntry { Name = "backups/2024" };
await foreach (var file in s3.FindAsync(folder, criteria: null))
{
 Console.WriteLine($"{file.Name}: {file.Size} bytes, modified {file.LastModified}");
}
// Search with criteria
await foreach (var file in s3.FindAsync(null, criteria: "*.zip"))
{
 Console.WriteLine(file.GetFullPath());
}

AmazonGlacierService

Low-cost archival storage for infrequently accessed data. Note: Glacier operations are asynchronous and may take hours to complete.

var glacier = new AmazonGlacierService(
 endpoint: "us-east-1",
 bucket: "my-archive-vault",
 accessKey: "...",
 secretKey: "..."
);
// Configure job timeout (default: 6 hours)
glacier.JobTimeOut = TimeSpan.FromHours(12);
// Configure poll interval (default: 1 minute)
glacier.PollInterval = TimeSpan.FromMinutes(5);
Features
Feature Supported
CanPublish No
CanExpirable No
CanFolders No
CanPartialDownload Yes
Upload to Glacier
var entry = new BackupEntry { Name = "archive/old-data-2020.tar.gz" };
await using var stream = File.OpenRead("old-data-2020.tar.gz");
await glacier.UploadAsync(entry, stream, p => Console.WriteLine($"{p}%"));
// Upload completes immediately
Download from Glacier
var entry = new BackupEntry { Name = "archive/old-data-2020.tar.gz" };
// This initiates a retrieval job and waits for completion
// Can take 3-5 hours for standard retrieval!
await using var stream = File.Create("restored-data.tar.gz");
await glacier.DownloadAsync(entry, stream, null, null,
 p => Console.WriteLine($"Retrieval: {p}%"));

Helper Extensions

using Ecng.Backup.Amazon;
// Get RegionEndpoint by name (flexible matching)
RegionEndpoint region = AmazonExtensions.GetEndpoint("us-east-1");
// Also accepts: "useast1", "US East (N. Virginia)", etc.

NuGet

Install-Package Ecng.Backup.AWS

Dependencies

  • AWSSDK.S3
  • AWSSDK.Glacier
  • 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.AWS:

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.170 158 6/17/2026
1.0.169 136 6/12/2026
1.0.168 136 5/15/2026
1.0.167 137 5/14/2026
1.0.166 138 5/3/2026
1.0.165 150 4/29/2026
1.0.164 154 4/14/2026
1.0.163 142 4/12/2026
1.0.162 170 3/17/2026
1.0.161 164 3/17/2026
1.0.160 156 3/15/2026
1.0.159 160 3/3/2026
1.0.158 161 2/28/2026
1.0.157 197 2/4/2026
1.0.156 168 2/1/2026
1.0.155 217 1/22/2026
1.0.154 196 1/19/2026
1.0.153 197 1/18/2026
1.0.152 172 1/18/2026
1.0.151 171 1/14/2026
Loading failed

Backup.AWS: fix S3 folder markers, multipart abort and large-file part size
Backup.AWS: don't resolve a Glacier archive by file name alone