Backends
A backend is the optional place NSchema persists a snapshot of the last applied schema. It’s
declared in a BACKEND config block, and it’s what enables:
- Offline planning —
planagainst the recorded snapshot, with no database connection; - Drift detection — comparing the live database against what was recorded;
show— inspecting the recorded schema.
A backend is optional: with no BACKEND block, NSchema plans against the live
provider every time. See Offline planning & state for when you
want one.
Available backends
Section titled “Available backends”| Backend | Page |
|---|---|
| Local file | Local file |
| Amazon S3 | Amazon S3 |
On the roadmap
Section titled “On the roadmap”Additional backends (Azure Blob Storage) are planned — see the roadmap.
Locking
Section titled “Locking”NSchema locks the backend during write operations (apply,
destroy, refresh) so concurrent runs
can’t corrupt the recorded state. If a run is interrupted and leaves a stale lock behind, clear
it with force-unlock — once you’re sure no operation is still
running.
This applies to every backend; the lock lives alongside the state it protects.