The restic holder copied JetStream's store while the server wrote it; such a copy may not restore. The nats image now carries mesh-nats-snapshot, run by the declared dump under the module's own bus account (snapshot API only): every stream one at a time, flow-controlled, into one tar with a manifest of counts, sequences and checksums. Restore builds a new store beside the live one with the bus's own server; a person swaps it in. Proven against throwaway nats 2.11 servers being written to during the snapshot.
16 lines
302 B
AMPL
16 lines
302 B
AMPL
module nats-snapshot
|
|
|
|
go 1.25.0
|
|
|
|
require (
|
|
github.com/klauspost/compress v1.18.5
|
|
github.com/nats-io/nats.go v1.51.0
|
|
)
|
|
|
|
require (
|
|
github.com/nats-io/nkeys v0.4.15 // indirect
|
|
github.com/nats-io/nuid v1.0.1 // indirect
|
|
golang.org/x/crypto v0.49.0 // indirect
|
|
golang.org/x/sys v0.42.0 // indirect
|
|
)
|