Postgresql
Sample database:
Download - https://neon.tech/postgresql/postgresql-getting-started/postgresql-sample-database
Instruction to restore - https://neon.tech/postgresql/postgresql-getting-started/load-postgresql-sample-database
For postgres running inside container:
-
First copy the tar file to /tmp folder inside container -
docker cp /path/to/your/database_dump.tar <container_name_or_id>:/tmp/database_dump.tar -
Connect to the container bash -
docker exec -it <container_name_or_id> bash -
Restore db using pg_restore -
pg_restore -U <postgres_user> -d <database_name> /tmp/database_dump.tar