pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
How to restore database without re-write database and tables owner by using postgres
2+ messages / 2 participants
[nested] [flat]

* How to restore database without re-write database and tables owner by using postgres
@ 2023-05-21 00:24 Cidy Long <cidy.long@gmail.com>
  2023-05-22 13:42 ` Re: How to restore database without re-write database and tables owner by using postgres David G. Johnston <david.g.johnston@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Cidy Long @ 2023-05-21 00:24 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org

Hi. Here.

I’m trying to restore multiple database backup tar files to new database server on PostgreSQL-15 by run command in shell script

    /usr/pgsql-15/bin/pg_restore -v --no-owner --host=$h --port=$db_port --username=postgres --dbname=$db_name $db_tar_file

but I found, the restored database’s owner and its tables owner was replaced by connect user (super user——postgres).

I tired to find out How to keep the database and its table original owner, I don’t find any thing.

Please advise!

Cidy=

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

* Re: How to restore database without re-write database and tables owner by using postgres
  2023-05-21 00:24 How to restore database without re-write database and tables owner by using postgres Cidy Long <cidy.long@gmail.com>
@ 2023-05-22 13:42 ` David G. Johnston <david.g.johnston@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: David G. Johnston @ 2023-05-22 13:42 UTC (permalink / raw)
  To: Cidy Long <cidy.long@gmail.com>; +Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>

On Saturday, May 20, 2023, Cidy Long <cidy.long@gmail.com> wrote:

> Hi. Here.
>
> I’m trying to restore multiple database backup tar files to new database
> server on PostgreSQL-15 by run command in shell script
>
>     /usr/pgsql-15/bin/pg_restore -v --no-owner --host=$h --port=$db_port
> --username=postgres --dbname=$db_name $db_tar_file
>
> but I found, the restored database’s owner and its tables owner was
> replaced by connect user (super user——postgres).
>
> I tired to find out How to keep the database and its table original owner,
> I don’t find any thing.
>
> Please advise
>

This isn’t a bug, requests for help should be directed to the -general list.
Using colors makes your e-mail hard to read on a white background.
‘you told it “no owner” which does exactly what you’ve described here.

David J.

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


end of thread, other threads:[~2023-05-22 13:42 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-05-21 00:24 How to restore database without re-write database and tables owner by using postgres Cidy Long <cidy.long@gmail.com>
2023-05-22 13:42 ` David G. Johnston <david.g.johnston@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