pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joshua D. Drake <jd@commandprompt.com>
To: David <dlbarron28@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Is pg_restore in 10.6 working?
Date: Mon, 12 Nov 2018 10:40:27 -0800
Message-ID: <654cbe5a-f2f5-fd5d-b64b-9fdcc6619741@commandprompt.com> (raw)
In-Reply-To: <CAPK0jFx8GkVhYfK8Pi5gPh87H9766VKHmsTn1140nUiq0G7fSA@mail.gmail.com>
References: <CAPK0jFx8GkVhYfK8Pi5gPh87H9766VKHmsTn1140nUiq0G7fSA@mail.gmail.com>

On 11/12/18 10:37 AM, David wrote:
>
> I can connect with psql either of these two ways:
> psql -U postgres
> or
> psql -h ip-172-31-62-127.ec2.internal -p 5432 -U postgres -W postgres
> (Yes, it's an AWS server)
>
> This pg_dump command works:
> pg_dump -U postgres -f predata.sql -F p -v  -d prod_data
>
> But a matching pg_restore command does nothing.
> pg_restore -U postgres -f predata.sql -v


pg_restore -U postgres -v predata.sql


-f is used to output data from a backup file into predata.sql.


Usage:
   pg_restore [OPTION]... [FILE]

General options:
   -d, --dbname=NAME        connect to database name
   -f, --file=FILENAME      output file name
   -F, --format=c|d|t       backup file format (should be automatic)
   -l, --list               print summarized TOC of the archive
   -v, --verbose            verbose mode
   -V, --version            output version information, then exit
   -?, --help               show this help, then exit


>
> I'm running 10.6.
>
> thank you
>
>

-- 
Command Prompt, Inc. || http://the.postgres.company/ || @cmdpromptinc
***  A fault and talent of mine is to tell it exactly how it is.  ***
PostgreSQL centered full stack support, consulting and development.
Advocate: @amplifypostgres || Learn: https://postgresconf.org
*****     Unless otherwise stated, opinions are my own.   *****





view thread (14+ messages)  latest in thread

Message-ID: <654cbe5a-f2f5-fd5d-b64b-9fdcc6619741@commandprompt.com>
Permalink:  ../654cbe5a-f2f5-fd5d-b64b-9fdcc6619741@commandprompt.com/
Also on:    postgresql.org/message-id/654cbe5a-f2f5-fd5d-b64b-9fdcc6619741@commandprompt.com

 · 

reply

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: jd@commandprompt.com, dlbarron28@gmail.com
  Subject: Re: Is pg_restore in 10.6 working?
  In-Reply-To: <654cbe5a-f2f5-fd5d-b64b-9fdcc6619741@commandprompt.com>
  References: <CAPK0jFx8GkVhYfK8Pi5gPh87H9766VKHmsTn1140nUiq0G7fSA@mail.gmail.com> <654cbe5a-f2f5-fd5d-b64b-9fdcc6619741@commandprompt.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