2

Looking for some guidance/best practice on how to back up a postgresql database running in an Openshift pod. I've come across this rsync solution for application data - https://docs.openshift.com/enterprise/3.2/admin_guide/backup_restore.html#backup-application-data - but was wondering how to use pg_dump?

I'd like the pg_dump to dump the database to a volume outside the pod.

bzo
  • 1,532
  • 7
  • 27
  • 40

1 Answers1

0

Nowadays best practice is most likely to use an Operator to run PostgreSQL on Kubernetes, for example with the Crunchy Data PostgreSQL Operator.

If you do not want to use Operators, another option would be to use a CronJob to run pg_dump in a regular interval and put the dump on a PersistentVolume mounted to the Pod.

Simon
  • 4,251
  • 2
  • 24
  • 34