2
netikras
10d

restoring a 2TB DEV DB running in k8s on SPOT instances is like trying to aim at a moving target. With a slingshot.

Comments
  • 0
    skill issue, lmao
  • 2
    @SidTheITGuy please share your wisdom, I'd very much like to know how to restore a pgdump into a pod that keeps restarting every ~30 minutes (the import takes ~1h)
  • 1
    s/TB/GB/
  • 0
    @netikras just kidding bro, u know it 😄
  • 0
    @netikras so is it with the pg_restore command ?

    You could use the --jobs=8 parameter.
  • 1
    @Grumm I'm running with -j5. Still not fast enough
  • 1
    Spin up an ec2 node and affinity your pod/stateful set to it. Pgdump to restore the volume, then kill it and let spot instances do their thing
  • 1
    It's one thing to reduce costs, but you need to engineer this into a break glass feature, that you ideally deploy from TF using a feature flag to enable
Add Comment