0

I'm trying to find the best approach for storing postgresql data. Starting with docker 1.9, looks like named volume are the way to go.

For backup, I'v seen around that people tar the volume to store it. However I'm concerned about the consistency of the resulting archive if the DB is in the middle of writing something for example. Can't this be an issue ?

I know about PG native mechanisms like pg_dump, I'm just wondering if what seems to be the docker way is compatible with a running DB system (I don(t think so, but want to be sure)

Thanks.

3
  • 1
    Look at my answer here - stackoverflow.com/questions/48187662/… - here are some notes you could find helpful. Safest way is to use PG own mechanisms. Commented Jan 23, 2018 at 11:51
  • You can use pg_dump: pg_dump is a utility for backing up a PostgreSQL database. It makes consistent backups even if the database is being used concurrently. Looking to this question you can create dumps: (cron job?): stackoverflow.com/questions/30171063/… and you can backup those dumps. Commented Jan 23, 2018 at 12:38
  • Thanks for your answers. Yes I konw about PG native mechanisms, I was wondering about docker approach compatibility with a rinning DB system. Editing my question to be more precise Commented Jan 23, 2018 at 13:04

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.