Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZNIpH-0006xF-JK for pgsql-admin@arkaria.postgresql.org; Thu, 06 Aug 2015 10:55:08 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZNIpG-0005E1-W3 for pgsql-admin@arkaria.postgresql.org; Thu, 06 Aug 2015 10:55:07 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZNInW-0003FH-2q for pgsql-admin@postgresql.org; Thu, 06 Aug 2015 10:53:18 +0000 Received: from nm27-vm7.bullet.mail.ir2.yahoo.com ([212.82.97.58]) by makus.postgresql.org with esmtps (TLS1.0:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1ZNInS-0004wW-TZ for pgsql-admin@postgresql.org; Thu, 06 Aug 2015 10:53:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1438858391; bh=Mqbt7Ay1k/UtcKxeSI063TKegdO7mSO5kQL1mIFv7A8=; h=Date:From:Reply-To:To:In-Reply-To:References:Subject:From:Subject; b=KQootQA22Izh02hJ3S4xQWklYN38GSNj7JtBqDFf+cnXB1URCn04D4ls1nkrsDU8cXI9zzNHqWVU/JV7fvl51d3efK8CGHFGJYPQ/Sgc0qvzSED8QQuKBI2u986qsVrDNvOfnjErglMq/XUUEoNgf6o64KD/CP5QvS5SxuqdkK+lWIg3iY/B5o7znc7nMulLCRZnouFkhbRMe8KOzRbYOdEtAhq5KsQ4hzXGZpIp90qe+Pb40g4++dJV2uzq6YQ+qKjgKh1fjMZG3YiD7ti06xdbcGwR1h9TagClN5Y0ePxs+0wJ3qS1RyLuIuUy2dr6DyA+E1O4Oii7zbjE0Uxqzg== Received: from [212.82.98.49] by nm27.bullet.mail.ir2.yahoo.com with NNFMP; 06 Aug 2015 10:53:11 -0000 Received: from [212.82.98.70] by tm2.bullet.mail.ir2.yahoo.com with NNFMP; 06 Aug 2015 10:53:11 -0000 Received: from [127.0.0.1] by omp1007.mail.ir2.yahoo.com with NNFMP; 06 Aug 2015 10:53:11 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 870794.41429.bm@omp1007.mail.ir2.yahoo.com X-YMail-OSG: FbDP_TkVM1lgvVkXPdO00ORVZvMYe5Y8EzA3MtBquXun.cUy7vHnvZPA3rId9EL U1po7kTcm8JudEv4J47hK0LtRqCfCi_w_enmu5ksoE_mRrKQnYpE.sesCuEev_3rAWDm6DtCoTth ORYn9hGedTV1rPJMc6204M9E5toGoMxoX_5WJ7fkKGffmbJ.gxPAHrX2EjcS7J6E9XaVaFzP8b2c iwB8FAFnEkk8mJYkhikj7s49Negtj_4DFTpRk5xugavN9sM8A2Bq6frwbisnzfXhA8Brrmp1DDI9 hViIHHfp.l8oY2Hkb9palWUXweqyhizrJ3m8nvhsa7PJdemv1kR.jeZ218_Jo50XoUWZcxCio6Zo rRZ58Xh4ICwisM5o7zLdlJHt01Tgr_xV7A8iFj.n4aKHQjz6kMB4_9x0LknIq1m153YjcnISHoDs LpUD9gVKQqcwTlNHA1xNjnI2QkNXudElBCZ_o5bMcZgof8NVmbWw.MPE6e1Cr7rYdQkZpclP9IiU Hr_cHhU.dY1frExit Received: by 212.82.98.123; Thu, 06 Aug 2015 10:53:11 +0000 Date: Thu, 6 Aug 2015 10:52:59 +0000 (UTC) From: Glyn Astill Reply-To: Glyn Astill To: "Geo P.C." , "pgsql-admin@postgresql.org" Message-ID: <530671698.62863.1438858379459.JavaMail.yahoo@mail.yahoo.com> In-Reply-To: References: Subject: Re: How to take backup of a table on a different schema in PostgreSQL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Length: 1398 X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org > From: Geo P.C. >To: pgsql-admin@postgresql.org >Sent: Thursday, 6 August 2015, 11:20 >Subject: [ADMIN] How to take backup of a table on a different schema in PostgreSQL > > > >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 > > If you take a peek at the man pages you'll see some thing like: "The -n and -N switches have no effect when -t is used, because tables selected by -t will be dumped regardless of those switches, and non-table objects will not be dumped." Try something like: pg_dump -U postgres -t 1.activity -d geopostgrest -f activity_05-08-2015.sql -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin