Re: Backups and restores. - Mailing list pgsql-general

From Tom Lane
Subject Re: Backups and restores.
Date
Msg-id 10543.1054998370@sss.pgh.pa.us
Whole thread Raw
In response to Backups and restores.  (Brian Avis <brian.avis@searhc.org>)
List pgsql-general
Brian Avis <brian.avis@searhc.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

pgsql-general by date:

Previous
From: "Henrik Steffen"
Date:
Subject: Re: update phenomenom
Next
From: Bruno Wolff III
Date:
Subject: Re: timestamp