@usine/durable/backup
Classes
Section titled “Classes”DurableStorageBackupError
Section titled “DurableStorageBackupError”A failed durable storage backup, with both paths because a copy error can come from either file.
Extends
Section titled “Extends”Schema.Class
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new DurableStorageBackupError(…
args):DurableStorageBackupError
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
…args |
[props: object, options?: MakeOptions] |
Returns
Section titled “Returns”Properties
Section titled “Properties”
readonlycause:unknown
destination
Section titled “destination”
readonlydestination:string
operation
Section titled “operation”
readonlyoperation:"stage"|"open"|"copy"|"publish"
reason
Section titled “reason”
readonlyreason:string
source
Section titled “source”
readonlysource:string
Variables
Section titled “Variables”backup
Section titled “backup”
constbackup: (instanceDirectory,destination) =>Effect.Effect<boolean,DurableStorageBackupError,never>
Copies the instance’s .usine/durable.sqlite to destination while the
orchestrator runs, through SQLite’s backup API on a read-only connection, so
the copy holds every committed transaction, including those still in the
WAL. The copy is written beside the destination, then hard-linked into place,
so an existing file is never overwritten; the destination directory must
exist and support hard links. Returns false, writing nothing, when the
instance has no durable storage yet.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
instanceDirectory |
string & Brand |
destination |
string |
Returns
Section titled “Returns”Effect.Effect<boolean, DurableStorageBackupError, never>