I have followed below process to backup my database file.
image 1 :
Image 2 :
After click on backup , I got a file with name resetmarathon_db.sql
Then I have store this file in my project/DB directory
In docker-compose.yml file I have use volume like below example
volumes:
- ./DB/resetmarathon_db.sql:/docker-entrypoint-initdb.d/resetmarathon_db.sql
This is the full section of docker-compose.yml file for postgres
resetmarathon_db:
container_name: resetmarathon_db
environment:
POSTGRES_DB: resetmarathon_db
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
image: postgres:latest
hostname: resetmarathon_db
restart: unless-stopped
networks:
- resetmarathon-network
volumes:
- ./DB/resetmarathon_db.sql:/docker-entrypoint-initdb.d/resetmarathon_db.sql
After build I'm getting only database table name with no any table.
How can I restore my sql file ?
My file and folder structure


