Running PostgreSQL on Kubernetes · Day 2 Operations with CloudNativePG
Demo 3 — Point-in-Time Recovery
An UPDATE without a WHERE, then a restore to a timestamp before it.
Beats
- 0:17Capture a pre-disaster timestamp T0.
- 0:24One UPDATE. Correcting a weight.
- 0:31Check.
- 0:39Oh no!! ... Anyway. Lets recreate.
- 0:40Make sure the WAL with our disaster history is flushed to th
- 0:53New Cluster CR: bootstrap.recovery from the ObjectStore, tar
- 1:0103-pitr-restore.yaml on screen
- 1:05Restore reads the base backup, replays WAL up to T0, stops.
- 1:16The real weights are back - in the RESTORED cluster. Product
- 1:26Recovery is not finished until production is fixed. The tabl
- 1:46Production is whole again. THIS is what the restore was for.
Replay it locally
asciinema play -i 2 demos/demo3.cast ·
download the cast