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