Backup/Restore a dockerized PostgreSQL database

后端 未结 10 1962
[愿得一人]
[愿得一人] 2020-12-22 15:50

I\'m trying to backup/restore a PostgreSQL database as is explained on the Docker website, but the data is not restored.

The volumes used by the database image are:<

10条回答
  •  北荒
    北荒 (楼主)
    2020-12-22 16:25

    dksnap (https://github.com/kelda/dksnap) automates the process of running pg_dumpall and loading the dump via /docker-entrypoint-initdb.d.

    It shows you a list of running containers, and you pick which one you want to backup. The resulting artifact is a regular Docker image, so you can then docker run it, or share it by pushing it to a Docker registry.

    (disclaimer: I'm a maintainer on the project)

提交回复
热议问题