From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Julie Nishimura <juliezain@hotmail.com>
To: pgsql-general <pgsql-general@postgresql.org>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: backup -restore question
Date: Mon, 13 Jul 2020 12:32:10 -0700
Message-ID: <97dbd799-7a6c-d0bc-deb2-fd56d3cda7a9@aklaver.com> (raw)
In-Reply-To: <BYAPR08MB5014E2946B409EE7779468DCAC600@BYAPR08MB5014.namprd08.prod.outlook.com>
References: <BYAPR08MB5014E2946B409EE7779468DCAC600@BYAPR08MB5014.namprd08.prod.outlook.com>
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.
--
Adrian Klaver
adrian.klaver@aklaver.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: adrian.klaver@aklaver.com, juliezain@hotmail.com
Subject: Re: backup -restore question
In-Reply-To: <97dbd799-7a6c-d0bc-deb2-fd56d3cda7a9@aklaver.com>
References: <BYAPR08MB5014E2946B409EE7779468DCAC600@BYAPR08MB5014.namprd08.prod.outlook.com> <97dbd799-7a6c-d0bc-deb2-fd56d3cda7a9@aklaver.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox