Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id DF8BDB5DC15 for ; Wed, 21 Sep 2011 11:35:53 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 75419-01 for ; Wed, 21 Sep 2011 14:35:47 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 7B3E4B5DC1A for ; Wed, 21 Sep 2011 11:35:47 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p8LEZlGx022491; Wed, 21 Sep 2011 10:35:47 -0400 (EDT) To: =?ISO-8859-1?Q?Henrique_Te=F3filo?= cc: pgsql-admin@postgresql.org Subject: Re: Errors recovering database In-reply-to: References: Comments: In-reply-to =?ISO-8859-1?Q?Henrique_Te=F3filo?= message dated "Wed, 21 Sep 2011 08:52:15 -0300" Date: Wed, 21 Sep 2011 10:35:46 -0400 Message-ID: <22490.1316615746@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.404 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.504 X-Spam-Level: X-Archive-Number: 201109/155 X-Sequence-Number: 38392 =?ISO-8859-1?Q?Henrique_Te=F3filo?= writes: > Dumping: > pg_dump -p -U'postgres' -C -f ./dumpbkp mydatabase > tar -cvzf dumpbkp.tar.gz dumpbkp > Restoring: > cat dumpbkp.tar.gz | gunzip | psql -U'postgres' AFAICS that ought not work at all, not even a little bit. You've wrapped the dump script into a tar archive, and then not unwrapped it. The pg_dump argument list seems a bit less than kosher, as well ... doesn't -p require an argument? regards, tom lane