Open uweremer opened 1 year ago
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.
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