Files
Grant 6ac118ae70 v0.1.0:24 — Keysat licensing service end-to-end
Daemon, StartOS wrapper, admin SPA, public buy/thank-you pages,
discount codes, free-license redemption, Apply-discount UX,
self-licensing, and v0.1.0 release notes.
2026-05-07 10:33:39 -05:00

20 lines
815 B
TypeScript

// Backup & restore.
//
// Everything important lives in the `main` volume (SQLite DB, which in turn
// contains the signing key). StartOS's default backup mechanism captures
// the whole volume, so we don't need custom backup logic — we just opt in.
//
// `setupBackups` returns `{ createBackup, restoreInit }`. `createBackup` is
// the package-level backup export; `restoreInit` is an InitScript we chain
// into `sdk.setupInit(...)` so that a restore triggers the right init
// sequence after the volume is repopulated.
//
// NOTE: The JSDoc example in 0.4.0 shows `sdk.Backups.volumes('main')`, but
// the actual runtime/type name is `ofVolumes`. The example is stale.
import { sdk } from './sdk'
export const { createBackup, restoreInit } = sdk.setupBackups(
async () => sdk.Backups.ofVolumes('main'),
)