Re: backup -restore question - Mailing list pgsql-general

From Ron
Subject Re: backup -restore question
Date
Msg-id 4e073ca3-9813-0fdb-a31e-4bb55efd4dd5@gmail.com
Whole thread Raw
In response to Re: backup -restore question  (Adrian Klaver <adrian.klaver@aklaver.com>)
Responses Re: backup -restore question
List pgsql-general
On 7/13/20 2:32 PM, Adrian Klaver wrote:
> On 7/13/20 12:12 PM, Julie Nishimura wrote:
>> Hello there,
>> One of our PostgreSQL 9.4.1  databases has been backed up as *.gz file 
>> with the compression 9 "pg_dump -Z 9". What is the right format of 
>> restore this file when needed? Can I run the restore from a compressed 
>> file or I need to unzip the file first, then run pg_restore? Thanks
>
> It depends on whether you dumped using the custom format -Fc or plain(no 
> -F or -Fp). If the custom format then you run pg_restore against it. If 
> the plain format then you will to unzip first then feed the file to psql.

What about this?
gunzip -c | foo.sql.gz | psql

-- 
Angular momentum makes the world go 'round.



pgsql-general by date:

Previous
From: FOUTE K. Jaurès
Date:
Subject: Re: PostgresQL 12 - could not connect to server: FATAL: the database system is in recovery mode
Next
From: Jean-Philippe Chenel
Date:
Subject: Both side privileges