Trouble with docker volume for backup/restore

From: Geoffrey Hoffman <geoffrey(dot)hoffman(at)advinow(dot)com>
To: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Trouble with docker volume for backup/restore
Date: 2021-09-08 18:51:37
Message-ID: CAHWbFL-LfeU_X9yFg87pSwm96BO9vWXCvcA186CmdmyULgQvcQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

It seems I am doing something wrong and I can't figure out what it is.

I have placed the following in my docker-compose.yml

pgadmin4:
image: dpage/pgadmin4
environment:
PGADMIN_DEFAULT_EMAIL: "${PGADMIN_DEFAULT_EMAIL-webmaster(at)localhost}"
PGADMIN_DEFAULT_PASSWORD: "${PGADMIN_DEFAULT_PASSWORD-Password1}"
ports:
- "81:80"
links:
- db
volumes:
- ../../../data:/data:rw

db:
image: postgres
environment:
POSTGRES_PASSWORD: r00tpwd
POSTGRES_DB: mydb
POSTGRES_USER: root
ports:
- "5431:5432"

I start my docker containers via docker-compose up
I can connect to pgadmin4 at http://localhost:81 and login successfully
I can create the "local" (Docker-based) server via host "db" on 5432 and
also via host IDE at port 5431
I can see `mydb` and its empty

I have a backup file from the dev server pgsql

I put my backup file in the /home/geoff/Projects/data directory

Here is the output of docker inspect on the container

$ docker inspect -f '{{ json .Mounts }}' docker_pgadmin4_1
[{"Type":"bind","Source":"
/home/geoff/Projects/data","Destination":"/data","Mode":"rw","RW":true,"Propagation":"rprivate"}

When I try to backup or restore in pgadmin4 (http://localhost:81) the
dialog box tells me <!> /data does not exist.

Any suggestions here?

*Geoffrey Hoffman*

Browse pgsql-admin by date

  From Date Subject
Next Message Michael Paquier 2021-09-09 01:09:52 Re: Estimating HugePages Requirements?
Previous Message Bossart, Nathan 2021-09-08 17:52:33 Re: Estimating HugePages Requirements?