VOOZH about

URL: https://www.nuget.org/packages/Ecng.Backup.Yandex/

⇱ NuGet Gallery | Ecng.Backup.Yandex 1.0.207




👁 Image
Ecng.Backup.Yandex 1.0.207

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

Ecng.Backup.Yandex

Yandex.Disk backup provider implementing IBackupService.

Overview

YandexDiskService provides cloud backup capabilities using Yandex.Disk cloud storage service.

Getting OAuth Token

  1. Go to https://oauth.yandex.com/
  2. Create an application with "Yandex.Disk REST API" permissions
  3. Get the OAuth token for your application

Usage

Creating the Service

using System.Security;
using Ecng.Backup;
using Ecng.Backup.Yandex;

// Create secure token
var token = new SecureString();
foreach (char c in "your-oauth-token")
 token.AppendChar(c);
token.MakeReadOnly();

var yandex = new YandexDiskService(token);

Features

Feature Supported
CanPublish Yes (permanent links only)
CanExpirable No
CanFolders Yes
CanPartialDownload No

Creating Folders

// Create nested folder structure
var folder = new BackupEntry { Name = "backups" };
var subfolder = new BackupEntry { Name = "2024", Parent = folder };

// Creates /backups/2024
await yandex.CreateFolder(subfolder);
// Parent folders are created automatically if they don't exist

Uploading Files

var entry = new BackupEntry { Name = "backups/2024/data.zip" };

await using var stream = File.OpenRead(@"C:\data.zip");
await yandex.UploadAsync(entry, stream, progress =>
{
 // Note: Progress may not be reported for all uploads
 Console.WriteLine($"Upload: {progress}%");
});

Downloading Files

var entry = new BackupEntry { Name = "backups/2024/data.zip" };

await using var stream = File.Create(@"C:\downloaded-data.zip");
await yandex.DownloadAsync(entry, stream, null, null, progress =>
{
 Console.WriteLine($"Download: {progress}%");
});
// Note: Partial downloads are not supported

Listing Files

// List files in folder (with pagination handled automatically)
var folder = new BackupEntry { Name = "backups/2024" };

await foreach (var item in yandex.FindAsync(folder, criteria: null))
{
 Console.WriteLine($"{item.Name}: {item.Size} bytes");
 Console.WriteLine($" Modified: {item.LastModified}");
}

// List root folder
await foreach (var item in yandex.FindAsync(null, criteria: null))
{
 Console.WriteLine(item.Name);
}

// Filter by name
await foreach (var item in yandex.FindAsync(folder, criteria: ".zip"))
{
 Console.WriteLine(item.Name); // Only items containing ".zip"
}

Publishing Files

var entry = new BackupEntry { Name = "shared/document.pdf" };

// Get public share link
string publicUrl = await yandex.PublishAsync(entry);
Console.WriteLine($"Share link: {publicUrl}");

// Remove public access
await yandex.UnPublishAsync(entry);

Deleting Files

var entry = new BackupEntry { Name = "backups/old-backup.zip" };
await yandex.DeleteAsync(entry);

Getting File Info

var entry = new BackupEntry { Name = "backups/data.zip" };
await yandex.FillInfoAsync(entry);

Console.WriteLine($"Size: {entry.Size}");
Console.WriteLine($"Modified: {entry.LastModified}");

Path Format

Yandex.Disk uses forward slashes for paths:

  • Root: /
  • Folder: backups/2024
  • File: backups/2024/data.zip

Error Handling

try
{
 await yandex.FillInfoAsync(entry);
}
catch (YandexApiException ex) when (ex.StatusCode == HttpStatusCode.NotFound)
{
 Console.WriteLine("File not found");
}

Important Notes

  1. OAuth token required: Get it from Yandex OAuth
  2. No partial downloads: You must download entire files
  3. No expiring links: Share links are permanent until unpublished
  4. Folder structure: Explicit folder creation is required (unlike S3)
  5. Pagination: Handled automatically when listing files

NuGet

Install-Package Ecng.Backup.Yandex

Dependencies

  • Ecng.Backup
  • YandexDisk.Client
Product Versions Compatible and additional computed target framework versions.
.NET net6.0 net6.0 is compatible.  net6.0-android net6.0-android was computed.  net6.0-ios net6.0-ios was computed.  net6.0-maccatalyst net6.0-maccatalyst was computed.  net6.0-macos net6.0-macos was computed.  net6.0-tvos net6.0-tvos was computed.  net6.0-windows net6.0-windows was computed.  net7.0 net7.0 was computed.  net7.0-android net7.0-android was computed.  net7.0-ios net7.0-ios was computed.  net7.0-maccatalyst net7.0-maccatalyst was computed.  net7.0-macos net7.0-macos was computed.  net7.0-tvos net7.0-tvos was computed.  net7.0-windows net7.0-windows was computed.  net8.0 net8.0 was computed.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 was computed.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 is compatible.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows 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.Yandex:

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.207 71 6/17/2026
1.0.206 127 6/12/2026
1.0.205 131 5/15/2026
1.0.204 125 5/14/2026
1.0.203 130 5/3/2026
1.0.202 190 4/14/2026
1.0.201 182 3/17/2026
1.0.200 151 3/17/2026
1.0.199 152 3/15/2026
1.0.198 151 3/3/2026
1.0.197 153 2/28/2026
1.0.196 151 2/25/2026
1.0.195 162 2/4/2026
1.0.194 164 2/1/2026
1.0.193 164 1/26/2026
1.0.192 160 1/26/2026
1.0.191 157 1/22/2026
1.0.190 164 1/22/2026
1.0.189 160 1/19/2026
1.0.188 163 1/19/2026
Loading failed