Skip to content
Français

archiveRecovery

import { archiveRecovery } from "@elie-laloum/outpost";

Upload a verified snapshot of a local recovery transfer in 4 MiB chunks, publish its manifest last and return the manifest reference. The source directory is kept. An interrupted upload can leave unreferenced chunks but never publishes a manifest.

Complete example and detailed rules.

  • optionsRequired
    RecoveryArchiveOptions
    Verified local recovery transfer, destination transport and total payload bound.
  • options.directoryRequired
    string
    Existing recovery transfer containing state.json, checksums.json and all required patches, bundles and extra files.
  • options.maxBytesOptional
    number | undefined
    Total payload bound, default 1 GiB; applies to the local snapshot and to the upload.
  • options.transporterRequired
    Transport
    Caller-owned object transport used by the store or operation. Closing a workflow or sandbox does not close this transport.
  • observationOptional
    ObservationHub | undefined
    Hub that receives the start and end events of the archive upload.

Promise<TransportReference>

export declare function archiveRecovery(
  options: RecoveryArchiveOptions,
  observation?: ObservationHub,
): Promise<TransportReference>;