I have this .yaml file:
version: '3.9'
services:
postgresql-postgis:
build: ./postgresql-postgis
image: image-postgresql-postgis-eb:v.1.0
container_name: container-postgresql-postgis-eb
ports:
- 5432:5432
volumes:
- type: bind
source: ./volumes/data-postgresql
target: /var/lib/postgresql
environment:
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "******************"
POSTGRES_DB: "tabellapostgres"
ALLOW_IP_RANGE: "0.0.0.0/0"
restart: always
networks:
- eb
pgadmin:
...
java:
...
networks:
eb
I have this Dockerfile:
FROM kartoza/postgis:14-3.2--v2022.05.09
EXPOSE 5432
I would like to perform a database backup without using pdAdmin but by copying the data-postgresql folder locally on my computer. If I try to copy the data-postgresql folder on my pc I get this error:
Error: Directory/home/ubuntu/ServerDockerJava01/volumes/data-postgresql/14/main: permission denied Error: Failed to retrieve directory listing