Keith, Thanks for this information. I have one other question. One of the old Db’s is going to change names on the new server (old is stash new will be Bitbucket). Can
I the restore or migrate the old DB’s tables into the new bitbucket DB? Thanks. Sam From: Keith Fiske <keith.fiske@xxxxxxxxxxxxxxx>
On Tue, May 7, 2019 at 11:14 AM SAMMY CRISWELL <Sammy_R_Criswell@xxxxxxxxxxxx> wrote:
Roles are global and their creation is not part of a single database's pg_dump, so they have to be created before restoring a pg_dump file. Otherwise the grants that are applied during the restore will fail. You
can get the role (and all global information) using pg_dumpall first pg_dumpall -U postgres -g -f globals.sql Then just feed that file into the new system with psql psql -U postgres -f globals.sql You can use the -C option to pg_restore to have it automatically create the originally named database for you as part of the restore. Otherwise you will have to create it first. Also, it is highly recommended that you use the pg_dump binary from the version you're upgrading to to perform the dump, not the original version's pg_dump. This better ensures any fixes to catalogs and other items
are applied to the dump file that is created. If you don't want to perform the dump across the network, you can copy the pg_dump binary from the new system to the old one as long as they're the same architecture. -- Keith Fiske |