Sylin.Koan.Data.Backup 0.8.0

dotnet add package Sylin.Koan.Data.Backup --version 0.8.0
                    
NuGet\Install-Package Sylin.Koan.Data.Backup -Version 0.8.0
                    
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="Sylin.Koan.Data.Backup" Version="0.8.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Sylin.Koan.Data.Backup" Version="0.8.0" />
                    
Directory.Packages.props
<PackageReference Include="Sylin.Koan.Data.Backup" />
                    
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 Sylin.Koan.Data.Backup --version 0.8.0
                    
#r "nuget: Sylin.Koan.Data.Backup, 0.8.0"
                    
#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 Sylin.Koan.Data.Backup@0.8.0
                    
#: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=Sylin.Koan.Data.Backup&version=0.8.0
                    
Install as a Cake Addin
#tool nuget:?package=Sylin.Koan.Data.Backup&version=0.8.0
                    
Install as a Cake Tool

Koan.Data.Backup

✅ Validated against streaming backup/restore pipelines and maintenance loops on 2025-09-29. See TECHNICAL.md for the full reference.

Contract

  • Purpose: Provide backup and restore orchestration for Koan data entities with streaming export, import staging, and progress tracking.
  • Primary inputs: BackupPlan definitions, entity metadata from Data<TEntity, TKey>, storage adapters registered through Koan Core.
  • Outputs: Snapshot archives streamed via BackupSession, restore jobs orchestrated through IDataRestoreService, and progress metrics surfaced to Web controllers.
  • Failure modes: Storage adapters lacking backup capability, long-running exports exceeding timeout, or restore pipelines missing entity registrations.
  • Success criteria: Backups stream without choking memory, progress endpoints report accurate percentages, and restore jobs reconcile entity versions safely.

Quick start

using Koan.Data.Backup.Core;
using Koan.Data.Backup.Models;

public static class BackupPlans
{
    public static BackupPlan OrdersDaily() => new()
    {
        PlanId = "orders:daily",
        Description = "Incremental order backup",
        Entities =
        {
            BackupEntity.For<Order>(bucket: "orders", scope: "tenant-a"),
            BackupEntity.For<Invoice>(bucket: "billing", scope: "tenant-a")
        }
    };
}

public sealed class BackupAutoRegistrar : IKoanAutoRegistrar
{
    public string ModuleName => "Backup";

    public void Initialize(IServiceCollection services)
        => services.AddBackupPlan(BackupPlans.OrdersDaily());

    public void Describe(BootReport report, IConfiguration cfg, IHostEnvironment env)
        => report.AddModule("Backup", "daily");
}
  • Define backup plans with strong typing and register them through Koan auto-registrar to activate background jobs and HTTP APIs.
  • Use BackupSession.StartAsync(...) to trigger on-demand exports or RestoreSession for imports, leveraging Data<TEntity, TKey> statics for persistence.

Configuration

  • Configure storage-specific settings (e.g., bucket, scope, container) via options bound in your adapter.
  • For large datasets, enable streaming exports (AllStream) and chunked uploads.
  • Inject IBackupDiscoveryService to query available plans and wiring into UI or CLI surfaces.

Edge cases

  • Paused backups: resume by reinvoking BackupSession.ResumeAsync with the stored continuation token.
  • Partially restored entities: use RestoreDiagnostics to replay failed rows and avoid duplicates.
  • Tenant isolation: ensure plan bucket/scope values isolate multi-tenant data to prevent leakage.
  • Storage quota: monitor adapter capability responses (AdapterCapabilities) to avoid saturating cold storage.
  • Koan.Data.Core – entity persistence primitives powering backup sessions.
  • Koan.Web.Backup – HTTP controllers for monitoring and controlling backups.
  • Koan.Core.Adapters – capability plumbing used by backup storage providers.

Documentation

  • TECHNICAL.md – end-to-end architecture, workflows, configuration, and edge cases.

Reference

  • IBackupPlanRegistry – plan discovery and registration.
  • IDataBackupService – programmatic API for running backups.
  • Data.Backup.Extensions – helper methods for DI registration.
Product Compatible and additional computed target framework versions.
.NET 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 (1)

Showing the top 1 NuGet packages that depend on Sylin.Koan.Data.Backup:

Package Downloads
Sylin.Koan.Web.Backup

ASP.NET Core Web API controllers for Koan Data Backup/Restore operations with polling-based progress tracking and comprehensive management endpoints.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.8.0 104 5/16/2026