Skip site navigation (1) Skip section navigation (2)

Re: Errors recovering database

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Henrique Teófilo <henriquetft(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Errors recovering database
Date: 2011-09-21 14:35:46
Message-ID: 22490.1316615746@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-admin
=?ISO-8859-1?Q?Henrique_Te=F3filo?= <henriquetft(at)gmail(dot)com> 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

In response to

Responses

pgsql-admin by date

Next:From: Henrique TeófiloDate: 2011-09-21 16:17:27
Subject: Re: Errors recovering database
Previous:From: Tom LaneDate: 2011-09-21 14:16:24
Subject: Re: Unaccent contrib module for PostgreSQL 8

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group