Docker-compose Down and Up - PostGres help

After doing a sql dump to backup just incase - I did a docker-pull and then a Down and Up - it appears it has restored me to a default.

Is there an easy way to redirect to the old PostGres data?

I found the volume with the appropriate data, i’m just having difficulty directing the DB in the docker-compose file to the directory/file in the var/lib/docker/volumes spot


you can copy the dir from /var/lib/docker/... to another local file and then mount it in docker-compose file.

Something like this:

  - ./postgres-data:/var/lib/postgresql/data

Source: postgresql - How to persist data in a dockerized postgres database using volumes - Stack Overflow