Re: Copy & Re-copy of DB

From: "sivapostgres(at)yahoo(dot)com" <sivapostgres(at)yahoo(dot)com>
To: Ken Tanzer <ken(dot)tanzer(at)gmail(dot)com>
Cc: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>, Ray O'Donnell <ray(at)rodonnell(dot)ie>
Subject: Re: Copy & Re-copy of DB
Date: 2021-01-22 07:11:57
Message-ID: 132794689.1264279.1611299517588@mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 server6.  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 AlwaysBKR Sivaprakash

On Friday, 22 January, 2021, 12:40:05 am IST, Ken Tanzer <ken(dot)tanzer(at)gmail(dot)com> wrote:

On Thu, Jan 21, 2021 at 5:52 AM sivapostgres(at)yahoo(dot)com <sivapostgres(at)yahoo(dot)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 systemBy and for non-profitshttp://agency-software.org/https://demo.agency-software.org/client
ken(dot)tanzer(at)agency-software(dot)org(253) 245-3801
Subscribe to the mailing list tolearn more about AGENCY orfollow the discussion.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ken Tanzer 2021-01-22 07:34:59 Re: Copy & Re-copy of DB
Previous Message Peter Krefting 2021-01-22 06:52:16 RPM dependency on pg_partman12 fails