How to generate a Postgresql Dump from a Docker container?

前端 未结 5 850
忘掉有多难
忘掉有多难 2021-01-31 02:55

I would like to have a way to enter into the Postgresql container and get a data dump from it.

5条回答
  •  情书的邮戳
    2021-01-31 03:37

    Another workaround method is to start postgre sql with a mountpoint to the location of the dump in docker.

    like docker run -v . Then perform a docker inspect on the docker running container

    docker inspect 
    

    you can find "Volumes" tag inside and a corresponding location.Go to the location and you can find all the postgresql/mysql files.It worked for me.Let us know if that worked for you also.

    Good luck

提交回复
热议问题