Re: Backups and restores.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Brian Avis <brian(dot)avis(at)searhc(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Backups and restores.
Date: 2003-06-07 15:06:10
Message-ID: 10543.1054998370@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Brian Avis <brian(dot)avis(at)searhc(dot)org> writes:
> /usr/local/pgsql/bin/pg_dump $db | gzip > /usr/local/pgsql/backups/$filename
> ./bin/pg_restore -d csp pgdump_2003-6-5-csp.gz
> pg_restore: [archiver] input file does not appear to be a valid archive

> So what sort of terribly obvious thing am I doing wrong?

You want something like

gzcat pgdump_2003-6-5-csp.gz | psql csp

pg_restore is for working with -Fc or -Ft output from pg_dump, not the
plain-text script output.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2003-06-07 15:07:05 Re: timestamp
Previous Message Doug McNaught 2003-06-07 14:55:33 Re: Backups and restores.