Re: pg_restore dumps all data to the terminal

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Ron <ronljohnsonjr(at)gmail(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: pg_restore dumps all data to the terminal
Date: 2018-04-27 03:15:33
Message-ID: CAKFQuwbDvoF1wCqoCWKVZmK=Ec67meFVJg-LvKiW3XxKrtZ9fg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Thursday, April 26, 2018, Ron <ronljohnsonjr(at)gmail(dot)com> wrote:

> Hi,
>
> v9.6.8, restoring from 8.4.17
>
> This command dumps not just the schema to the terminal (technically,
> nohup.out) but the actual data. How do I stop that? There's no --quiet,
> and that's not what I want anyway...
>
> pg_restore -cC --if-exists -e -Fd -j4 ${SOURCE}/${DB}
>
>
"pg_restore can operate in two modes. If a database name is specified,
pg_restore connects to that database and restores archive contents directly
into the database. Otherwise, a script containing the SQL commands
necessary to rebuild the database is created and written to a file or
standard output."

You haven't specified a database so you get the second mode.

David J.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Ron 2018-04-27 03:31:37 Re: pg_restore dumps all data to the terminal
Previous Message Ron 2018-04-27 02:56:15 pg_restore dumps all data to the terminal