Run an installation / Back up, restore, roll back
Back up, restore, roll back
Three things make an installation: the rules' history, the ledger and the state. They are backed up together every night. A restore can never quietly bring back a revoked key or a suspended agent.
What is kept
| Volume | Holds |
|---|---|
| Rules' history | a git repository: every rule, every change, who made it |
| Ledger | a year of decisions and changes, one file per day |
| State | the directory and the key store (hashes only), and a consistent copy of both rewritten within 2 seconds of any change |
Backups
- Nightly on the server: all three volumes in one archive, kept 14 days. An archive missing any of the three is refused.
- On demand, before any change you want a way back from.
- Off the server: your daily ledger exports (Verify and export) are your copy of the record that the server's operator cannot reach.
Restore
The state is restored from its consistent copy, with the backend stopped. Then Caroline checks the restored store against the ledger before it publishes anything:
| The store is | Caroline |
|---|---|
| ready | in step with the ledger: publishes the key list and the directory |
| behind | older than the last change the ledger records: publishes nothing until an owner releases it. A release first re-applies every key revocation, removal and suspension made since, then lists the rest. |
| lost | one the ledger does not know: publishes nothing until an owner restores the right one or accepts this |
| new | never set up: publishes nothing until it is initialised |
While it publishes nothing, the PDP keeps the key list it last held and the engine its last directory, so gateways keep working. GET /api/v1/state says which state, and what a release would do.
Roll back a rule change
In History, Restore this version, then review and publish. It is a new change, recorded like any other (Put it back).
Roll back a release of Caroline
Quince Software rolls an installation back to an earlier release on request. One thing to know first: a gateway with a binding stops working on a release older than bindings (its keys are published only beside its binding). Unbind such gateways before a planned rollback, and bind them again after.