Trouble with docker volume for backup/restore

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@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

[Index of Archives]     [Postgresql Home]     [Postgresql General]     [Postgresql Performance]     [Postgresql PHP]     [Postgresql Jobs]     [PHP Users]     [PHP Databases]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Forum]

  Powered by Linux