pg_restore in postgres docker container

后端 未结 2 2278
情话喂你
情话喂你 2021-02-20 18:46

I am trying to restore database in PostgreSQL docker container using pg_restore from a shellscript taht will be called from docker file .I am getting following error \"E

2条回答
  •  故里飘歌
    2021-02-20 19:22

    Here is a way to restore from a file located on the host machine:

    docker exec -i container_name pg_restore -U postgres_user -v -d database_name < /dir_backup_outside_container/file_name.tar
    

提交回复
热议问题