Table of Contents

Interface IBackupService

Namespace
Typhon.Engine
Assembly
Typhon.Engine.dll

Online backup of a running database (Backup): a consistent point taken while the engine keeps committing, one at a time, on the engine's backup thread. With Backup set, the engine also schedules points, verifies and retains them, and reports its health (#1416).

public interface IBackupService

Remarks

Failures: a BackupAbortedException when the capture was abandoned, its Reason saying why (cancelled, the engine closing, a writer the backup could not keep up with, the store failing). An abandoned point publishes nothing and forgets no page: the next point covers it. A TyphonException with BackupInProgress when a backup is already running, or BackupNotConfigured when the store asked for is not the one configured. The store's own refusals are the typed BackupStoreLockedException and BackupStoreMismatchException.

Properties

Status

The engine's backups now: health and why, the running job, the last point, the counters. A published snapshot: 0 B per read.

BackupStatus Status { get; }

Property Value

BackupStatus

Methods

CreateAsync(string, BackupRequestKind, CancellationToken)

Takes a backup point of the running database into the store at storePath (created when absent). An engine with BackupOptions accepts only its configured store: a point elsewhere would cost that store its incremental chain.

Task<BackupPointSummary> CreateAsync(string storePath, BackupRequestKind kind = BackupRequestKind.Auto, CancellationToken ct = default)

Parameters

storePath string

The store directory; it belongs to this database once it holds a point.

kind BackupRequestKind

Auto (admission decides) or a forced full point.

ct CancellationToken

Abandons the capture: nothing is published.

Returns

Task<BackupPointSummary>

The published point, once it is published and verified.

CreateAsync(BackupRequestKind, CancellationToken)

Takes a backup point into the configured store (StorePath).

Task<BackupPointSummary> CreateAsync(BackupRequestKind kind = BackupRequestKind.Auto, CancellationToken ct = default)

Parameters

kind BackupRequestKind

Auto (admission decides) or a forced full point.

ct CancellationToken

Abandons the capture: nothing is published.

Returns

Task<BackupPointSummary>

The published point, once it is published and verified.

Exceptions

TyphonException

BackupNotConfigured: this engine has no BackupOptions.