Go · Snapshots

Snapshots

1.0.0-rc.1 · 084197c4

Ask your coding agent about this page, or add the docs server to it

curl -s 'https://www.unum.cloud/docs/ustore/go/snapshots.md' | claude -p "How would this fit my code?"

A snapshot pins the state it was taken at until it is closed, and its verbs read that state; nothing writes through it. Snapshot.ReadStamp is the stamp it reads at, which every commit whose CommitStamp is at or below it shows. Save writes it out as a new database of the same engine, holding exactly the collections and names it records.

snapshot, err := database.SnapshotInit()
defer snapshot.Close()
pinned, err := snapshot.BlobsRead(people, []ustore.Key{ada}, arena, nil)
err = snapshot.Save("/var/lib/people-copy", nil)