mirror of
https://github.com/Haiti-Distributed-Healthcare-System/hdhs.git
synced 2026-10-26 17:35:23 +00:00
626 B
626 B
Database Management
How to load a backup into your postgres docker container
First, decrypt the pg_dump files.
git secret reveal
Second, restore the pg_dump into the container.
gunzip -c ./backups/version.sql.gz | docker exec -i hdhs_database_1 psql -U postgres -d app_db
Running Notes
generate backups:
docker exec hdhs_database_1 pg_dump -U postgres app_db | gzip > backups/20200408.tar.gz
Enter database container
docker-compose -f dev-docker-compose.yml run database bash
Enter DB inside container
psql --host=database --username=postgres --dbname=app_db