Re: Copy & Re-copy of DB

From: Benedict Holland <benedict(dot)m(dot)holland(at)gmail(dot)com>
To: Ken Tanzer <ken(dot)tanzer(at)gmail(dot)com>
Cc: sivapostgres(at)yahoo(dot)com, pgsql-general <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 13:17:03
Message-ID: CAD+mzowaFe0_7_NMLWYUWFfCqSNdA9GDbpK+vAQLyu0n=wAheQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I mean... the best? You just laid out a bunch of steps to define a process.
I will tell you that this sounds like a bad process and that there are
easier ways to make changes like inside of a transaction or backing up a
database before making changes or creating a table replication job, making
changes to one server, and push it to the other one.

But you didn't want to do that. You wanted to create a single file for your
database, load it into a server, make changes, and copy them back. I would
say that this is an overly complicated and unnecessary process but if that
is how you want to make changes then what you described is the set of
steps.

Thanks,
Ben

On Fri, Jan 22, 2021, 2:35 AM Ken Tanzer <ken(dot)tanzer(at)gmail(dot)com> wrote:

>
>
> On Thu, Jan 21, 2021 at 11:12 PM sivapostgres(at)yahoo(dot)com <
> sivapostgres(at)yahoo(dot)com> wrote:
>
>> 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?
>>
>>
> Well I don't know if it's best or not. But you said you wanted:
>
> to copy the database from one server to another, work in another server,
>> and re-copy it in the original server.
>>
>> (and additionally end up with the database having the same name on the
> original server.)
>
> So your steps do seem like they would be one way to accomplish that. What
> counts as the "best" way would depend on what else is important to you
> about this process, i.e. what criteria would you use for best?
>
> Cheers,
> Ken
>
>
>
>
> --
> AGENCY Software
> A Free Software data system
> By and for non-profits
> *http://agency-software.org/ <http://agency-software.org/>*
> *https://demo.agency-software.org/client
> <https://demo.agency-software.org/client>*
> ken(dot)tanzer(at)agency-software(dot)org
> (253) 245-3801
>
> Subscribe to the mailing list
> <agency-general-request(at)lists(dot)sourceforge(dot)net?body=subscribe> to
> learn more about AGENCY or
> follow the discussion.
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rory Campbell-Lange 2021-01-22 14:21:32 Re: Copy & Re-copy of DB
Previous Message Hou, Zhijie 2021-01-22 08:31:53 RE: FDW connections