1

Please let us know in PostgreSQL how we can take backup of a table on a different schema. We have db named "geopostgrest" and under Schema named "1" (Not inside Public Schema) we need to take backup of table "activity"

Please see the following:

postgres=# \c geopostgrest You are now connected to database "geopostgrest" as user "postgres". geopostgrest=# \dt No relations found. geopostgrest=# \dt 1. List of relations Schema | Name | Type | Owner --------+---------------------------------+-------+---------- 1 | activity | table | postgres 

We tried the following command but its not working.

pg_dump -U postgres -n1 -d geopostgrest -t activity -f activity_05-08-2015.sql pg_dump: No matching tables were found 

We are using PostgreSQL 9.4.4 and Ubuntu 14.04.2 LTS

Can any one please help us on it

Thanks

2 Answers 2

1

Able to take backup of a table on a different schema in PostgreSQL with the following command and its working perfectly:

pg_dump -U postgres -t 1.activity -d geopostgrest -f activity_05-08-2015.sql 
0

Can you try with -n 1 (space between them)?

Also I cannot find the -d parameter. If you need to specify the database then you just put it in as the last or first parameter.

2
  • Yes tried but getting same error pg_dump: No matching tables were found Commented Aug 5, 2015 at 13:49
  • "...cannot find the -d parameter..." man pg_dump; shows, -d dbname --dbname=dbname. Commented Feb 7 at 20:12

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.