TinyStore
Reference / Backup API for Bun and Node
On this page

Reference / Backup API for Bun and Node

Backup API for Bun and Node

Every public class, function and type of the Backup engine in @tinyshed/tinystore, generated from its source. The Backup guide explains how to use them, and the Python, Go and Rust pages list the same API.

BackupOptions

ts
interface BackupOptions {
    /**
     * files of the program's it includes, by their paths inside the store's
     * directory, such as 'secret.key', which a restore puts back where they
     * were: a backup holds none unless named
     */
    include?: readonly string[]
    /**
     * includes the store's encryption key, as it is, which a backup leaves
     * out otherwise: the zip is not encrypted, so a backup with the key opens
     * every value it holds
     */
    includeEncryptionKey?: boolean
}

What a backup takes beside every engine's files.

Backup

ts
interface Backup {
    /** the files, the engines' and those it was told to take */
    files: number
    /** their bytes, the zip's own fields aside */
    bytes: number
    /**
     * the store seals values with an encryption key the backup does not
     * hold: they open with that key alone, kept apart
     */
    keyLeftOut: boolean
}

What a backup holds.

Generated from the source Updated 19 October 2026

esc
↑↓ navigate ↵ open ⇥ filter 0 results