-d " /> -d " /> -d "/>

Restore Specific Postgres table from outside Docker container using .sql file

127 views Asked by At

I can able to take dump of specific table outside the container by the below command,

docker exec -i postgres /bin/bash -c "pg_dump -U <user_name> -d <db_name> -t 'public.\"<table_name>\"' " > <file_name>.sql

Tried multiple ways, but I'm unable to restore the specific postgres table from outside the container. I've used the below command, please help me with this.

docker exec -i postgres /bin/bash -c "pg_restore -U <user_name> -d <db_name> -t 'public.\"<table_name>\"' " > <file_name>.sql
0

There are 0 answers