Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backup database volumes #1

Open
uweremer opened this issue Oct 20, 2022 · 1 comment
Open

Backup database volumes #1

uweremer opened this issue Oct 20, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@uweremer
Copy link
Owner

PostgreSQL data is located within persistent volume of docker container. Need to iImplement Backup strategy! https://docs.docker.com/storage/volumes/#back-up-a-volume

@uweremer uweremer added the enhancement New feature or request label Oct 20, 2022
@luerhard
Copy link

The easiest way to extract a backup from a Postgres docker container is via the docker exec command:

docker exec CONTAINER_NAME pg_dump -Fc DBNAME > pg_backup.fc

For recurring backups, this could be just in a cronjob.

Another option would be to use a mounted volume (most easily done with docker-compose) to persist the folder in the host file system. After pausing the container, this folder can just be copied somewhere else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants