@backblaze-labs/b2-sdk - v0.2.0
    Preparing search index...

    Interface SyncOptions

    Configuration options for a sync operation.

    interface SyncOptions {
        compareMode: CompareMode;
        compareThreshold?: number;
        concurrency?: number;
        downloadIdleTimeoutMillis?: number;
        dryRun?: boolean;
        encryptionProvider?: SyncEncryptionProvider;
        exclude?: readonly SyncFilterPattern[];
        include?: readonly SyncFilterPattern[];
        keepDays?: number;
        keepMode: KeepMode;
        maxScanEntries?: number;
        sha1ReadTimeoutMillis?: number;
        sha1VerificationMaxBytes?: number;
        sha1VerificationTimeoutMillis?: number;
        signal?: AbortSignal;
    }

    Hierarchy (View Summary)

    Index

    Properties

    compareMode: CompareMode

    How to decide whether two files differ.

    compareThreshold?: number

    Tolerance for comparison (bytes for size, milliseconds for modtime).

    concurrency?: number

    Maximum number of concurrent transfer actions. Must be a positive integer. Defaults to 4.

    downloadIdleTimeoutMillis?: number

    Idle timeout in milliseconds for B2-to-local download body reads. Must be positive, or Infinity to disable the timeout. Defaults to 60 seconds.

    dryRun?: boolean

    When true, actions are generated but not executed.

    encryptionProvider?: SyncEncryptionProvider

    Optional provider for per-file encryption settings.

    exclude?: readonly SyncFilterPattern[]

    Optional deny-list. Paths matching any exclude pattern are skipped even when they also match an include pattern. Excludes are client-side filters; they do not reduce B2 list API calls or the B2 scanner's version grouping and sort memory.

    include?: readonly SyncFilterPattern[]

    Optional allow-list. When present, only paths matching at least one pattern are scanned. B2 scans can push down only the safe literal prefix from slash-containing glob includes; other include filtering is client-side.

    keepDays?: number

    Number of days to retain orphaned destination files when keepMode is 'keep-days'.

    keepMode: KeepMode

    What to do with destination files absent from the source.

    maxScanEntries?: number

    Maximum scanner entries retained before failing with a defined scan-limit error.

    sha1ReadTimeoutMillis?: number

    Optional idle/no-progress timeout in milliseconds for SHA-1 reads in sha1 mode.

    sha1VerificationMaxBytes?: number

    Optional per-file byte ceiling for untrusted B2 SHA-1 verification reads.

    By default, verifying untrusted B2 metadata may download the selected version's full contentLength each run. Set this to a lower value to skip objects above the per-file budget before they can be treated as equal.

    sha1VerificationTimeoutMillis?: number

    Optional absolute deadline in milliseconds for untrusted B2 SHA-1 verification reads. Objects that cannot be fully verified before this deadline are skipped for that run.

    signal?: AbortSignal

    Signal to abort the sync operation, including scans and in-progress SHA-1 reads.