Re: Copy & Re-copy of DB - Mailing list pgsql-general

From sivapostgres@yahoo.com
Subject Re: Copy & Re-copy of DB
Date
Msg-id 132794689.1264279.1611299517588@mail.yahoo.com
Whole thread Raw
In response to Re: Copy & Re-copy of DB  (Ken Tanzer <ken.tanzer@gmail.com>)
Responses Re: Copy & Re-copy of DB
List pgsql-general
So the solution to the issue will be

1.  Backup a DB using PGDUMP from 1st server.
2.  Restore the DB in 2nd server.
3.  Make required changes in the 2nd server.
4.  Backup that DB using PGDUMP from 2nd server.
5.  Delete / Rename that DB in the 1st server
6.  Restore that DB in the 1st server.
7.  Work again in the 1st server.

Is this the best way to carry out this process?

Happiness Always
BKR Sivaprakash


On Friday, 22 January, 2021, 12:40:05 am IST, Ken Tanzer <ken.tanzer@gmail.com> wrote:




On Thu, Jan 21, 2021 at 5:52 AM sivapostgres@yahoo.com <sivapostgres@yahoo.com> wrote:
create database is to create a new database.  If we switch to new database, we need to change the new databasename in the program(s) that access this database.  

If you are just concerned about having the same database name, what about renaming (ALTER DATABASE ... RENAME TO) the old and/or new databases so they end up the way you want?

Cheers,
Ken

--
AGENCY Software  
A Free Software data system
By and for non-profits
(253) 245-3801

learn more about AGENCY or
follow the discussion.

pgsql-general by date:

Previous
From: Peter Krefting
Date:
Subject: RPM dependency on pg_partman12 fails
Next
From: Ken Tanzer
Date:
Subject: Re: Copy & Re-copy of DB