Re: Errors recovering database

From: Henrique Teófilo <henriquetft(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: Errors recovering database
Date: 2011-09-21 16:17:27
Message-ID: CAJhkEk4kuCADSTzNhSiG5tsHzMLEWNGQh+VgL7tty4msDftgBA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi Tom.

Actually the -p paremeter has the argument, but I think I've removed it to
clarify the command, because it comes from a variable $pgport in my script.

Concerning to tar command, I think you're right, I didn't notice... but it
did work great until pop up these erros in the end, so I've googled and I've
seen other people with the same problem, what led me to think it was a
postgres error.

I'll try again unwrapping the file properly

Thanks.

On Wed, Sep 21, 2011 at 11:35 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> =?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

Browse pgsql-admin by date

  From Date Subject
Next Message Patrick Garner 2011-09-22 01:58:39 Question about GSSAPI
Previous Message Tom Lane 2011-09-21 14:35:46 Re: Errors recovering database