feat(canopy): N2: blob store backups and paired restore - #810
Conversation
|
🤖 No Canopy code change. One config step, and it's required rather than optional: On Canopy, once the type name is final:
No migration, no PR. |
|
I think it does need something from canopy, because canopy won't allow the creds for the followers |
|
🤖 You're right, and my comment above is wrong on that. Still config rather than code, but with an ordering constraint: the type default has to exist, with Enabling can't be coded away regardless, since the staleness scan filters on If the ordering risk is worth code, the smallest version is an operator-set flag on the capability so Also correcting the comment above: restore creds aren't gated per type, only by the per-server restore window. |
10a66a4 to
3155189
Compare
|
Generally LGTM, one thing that could be a nice optimisation if not already considered is on systems where snapshots are whole-volume (NTFS), and where both leader and follower (etc) are on the same volume, take a single snapshot to run both backups. |
| ### Sharing a whole-volume capture | ||
|
|
||
| Where a leader's capture covers a whole volume rather than just its own source, a follower whose source is on that volume is read out of the leader's capture instead of live. | ||
| Only a backend that snapshots the entire volume qualifies: a Windows VSS shadow copy does, where btrfs and thin-LVM snapshot a subvolume or logical volume and a base backup copies a directory, so nothing else on the disk is inside any of those. |
There was a problem hiding this comment.
Well, kind of: if /var/lib/foo is a btrfs subvol, and we try to backup /var/lib/foo/bar and /var/lib/foo/qux, that's still shared snapshot coverage
|
Splitting some of this out so I can separate secret backup from blob backup |
9aaa28c to
05cd024
Compare
Implements the bestool side of Tamanu's blob store backup spec (
specs/blob-storage/backups.md, id BKUP, on beyondessential/tamanu#10708). The store is a content-addressed, append-only tree, so atamanu-postgresbackup alone no longer captures a server's whole state, and the two captures have to stay ordered (database first, store second) and be restorable as a pair. Continues from #809.Stacked on #854, which carries the follower mechanism (
after, paired restore, shared volume captures) on its own so it can land without waiting on blob QA. Review this one against that base; it is now blob-only:[simple]acceptspath_commandas an alternative topath, andbestool tamanu blob-rootprints the store root from Tamanu'sblobStorage.rootsetting, so the def follows an admin-panel change instead of silently going stale, and a restored store lands where the just-restored database expects it.tamanu-postgresusing feat(canopy): chain follower backups and restore them as a pair #854'safter.Checked on a real repo against the pinned kopia 0.23.1: both pairing signals come back from
snapshot list. Tags looked like they didn't because the key comes back spelledtag:canopy-type.USAGE.md was regenerated on macOS without the iti features and spliced by hand; the check-docs job is the byte-for-byte confirmation.