Обсуждение: BUG #16062: pg_restore using ssl certs

Поиск
Список
Период
Сортировка

BUG #16062: pg_restore using ssl certs

От
PG Bug reporting form
Дата:
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


Re: BUG #16062: pg_restore using ssl certs

От
Ashutosh Sharma
Дата:
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
>