From: Cidy Long <cidy.long@gmail.com>
To: pgsql-bugs@lists.postgresql.org
Subject: How to restore database without re-write database and tables owner by using postgres
Date: Sun, 21 May 2023 10:24:30 +1000
Message-ID: <C35FABA3-0B31-43CD-B2F2-273CADEE026C@gmail.com> (raw)
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=
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 using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: cidy.long@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: How to restore database without re-write database and tables owner by using postgres
In-Reply-To: <C35FABA3-0B31-43CD-B2F2-273CADEE026C@gmail.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