pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #16062: pg_restore using ssl certs
2+ messages / 2 participants
[nested] [flat]

* BUG #16062: pg_restore using ssl certs
@ 2019-10-17 07:12  PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Bug reporting form @ 2019-10-17 07:12 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: somesh.ng@gmail.com

The following bug has been logged on the website:

Bug reference:      16062
Logged by:          Somesh ng
Email address:      somesh.ng@gmail.com
PostgreSQL version: 10.0
Operating system:   Ubuntu
Description:        

Can somebody help me in restoring postgres db using SSL certs. I tried in
below way but it didn't work

pg_restore "host=hostname user=username dbname=database_name
sslcert=sslcert.crt sslkey=sslkey.key sslrootcert=sslroot.pem
sslmode=verify-full" -f filename
It gives the below error

pg_restore: [archiver] could not open input file "host=hostname
user=username dbname=database_name sslcert=sslcert.crt sslkey=sslkey.key
sslrootcert=sslroot.pem sslmode=verify-full": No such file or directory



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #16062: pg_restore using ssl certs
@ 2019-10-17 08:17  Ashutosh Sharma <ashu.coek88@gmail.com>
  parent: PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Ashutosh Sharma @ 2019-10-17 08:17 UTC (permalink / raw)
  To: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>; somesh.ng@gmail.com

Hi,

You need to use -d/--dbname= option to specify the SSL parameters with
pg_restore like shown below.

1) pg_restore -d "dbname=testdb host=127.0.0.1 port=5432
sslmode=verify-full sslkey=/tmp/certs/postgresql.key" pg.dump >
res.out

OR,

2) pg_restore --dbname="dbname=testdb host=127.0.0.1 port=5432
sslmode=verify-full sslkey=/tmp/certs/postgresql.key"  pg.dump >
res.out

where pg.dump is the input file.

By the where is your input file ? -f is for the output file. Further,
you cannot use -d and -f options together.

--
With Regards,
Ashutosh Sharma
EnterpriseDB:http://www.enterprisedb.com

On Thu, Oct 17, 2019 at 12:42 PM PG Bug reporting form
<noreply@postgresql.org> wrote:
>
> The following bug has been logged on the website:
>
> Bug reference:      16062
> Logged by:          Somesh ng
> Email address:      somesh.ng@gmail.com
> PostgreSQL version: 10.0
> Operating system:   Ubuntu
> Description:
>
> Can somebody help me in restoring postgres db using SSL certs. I tried in
> below way but it didn't work
>
> pg_restore "host=hostname user=username dbname=database_name
> sslcert=sslcert.crt sslkey=sslkey.key sslrootcert=sslroot.pem
> sslmode=verify-full" -f filename
> It gives the below error
>
> pg_restore: [archiver] could not open input file "host=hostname
> user=username dbname=database_name sslcert=sslcert.crt sslkey=sslkey.key
> sslrootcert=sslroot.pem sslmode=verify-full": No such file or directory
>





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2019-10-17 08:17 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-10-17 07:12 BUG #16062: pg_restore using ssl certs PG Bug reporting form <noreply@postgresql.org>
2019-10-17 08:17 ` Ashutosh Sharma <ashu.coek88@gmail.com>

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