[Evergreen-dev] PostgreSQL Installation help

Jason Stephenson jason at sigio.com
Wed Jul 12 19:26:50 EDT 2023


On 7/12/23 12:43, Brian Holda via Evergreen-dev wrote:
> Is anyone very familiar with installing / reinstalling postgreSQL 
> server? We did a database migration and in doing that our |pg_control|​ 
> file went missing from the |global|​ directory. We have some ideas of 
> what to do based on online searches, but wanted to ask in case there is 
> a resident with some expertise in this area.

Brian,

This is more or less what I've done every time I've set up a new 
PostgreSQL server:

1. Install and configure PostgreSQL on the new server.
2. Install the necessary prerequisites for the database.
3. Do a pg_dump on the old server:
     /usr/bin/pg_dump -d evergreen -Fc --serializable-deferrable > 
evergreen.dmp
4. Copy the dump over to the new server.
5. Load it with pg_restore:
     /usr//bin/pg_restore -U evergreen -h localhost -C -c -d postgres 
evergreen.dmp

The above should work even with PostgreSQL version upgrades.  If you are 
upgrading your PostgreSQL version, it is a good idea to use the pg_dump 
for the new version.  You can actually run the pg_dump from anywhere 
that can access the old server as a client.

Hope that helps,
Jason



More information about the Evergreen-dev mailing list