v0.6.4: Backups hold the data keys
Upgrading
No migration. Deploy as usual. The first daily run afterwards writes a format-2 backup. An earlier
release can still restore a format-1 backup, but not a format-2 one, so keep portona-restore from
this release or later once the first format-2 backup exists.
One snapshot, format 2
The daily backup is now read in one transaction and holds:
- the environment ledger, with which environments read data keys;
- every master-key secret row, with its details;
- each environment’s data keys, still wrapped, and the secrets under them;
- every federation;
- the ids of the master key and the wrapping keys the rows need.
portona-restore reads format 2 and every earlier backup, and prints the backup’s format and the
key ids it needs before you run the batch. See Backups and recovery.
What a restore brings back
- Data keys fill gaps only, like the ledger. A key the database already holds stays as it is.
- A data-keyed copy comes back only beside the data key it was encrypted with. A copy left out counts as not copied, and the next backfill copies it again from its master-key row.
- Nothing of a retired environment ID: its data keys and copies stay gone, as its secrets already did.
Backups hold no wrapping key. Keep each one’s escrow for as long as a backup names its id.