Re: Postgres Backup Utility

From: "French, Martin" <frenchm(at)cromwell(dot)co(dot)uk>
To: "Bradley Holbrook" <operations_bradley(at)servillian(dot)ca>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Postgres Backup Utility
Date: 2011-01-19 07:12:43
Message-ID: 81976671721DF04B9DCA6ECD87941A402640863E@roundway.Cromwell-tools.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Ok, you say that you cannot drop and recreate, so you need to do this
via alter statements only? That's obviously going to complicate matters,
as a straight dump, drop, recreate, restore would be the fastest and by
far simplest method.

So, Ideally, you'll need to do a table def comparison over the two
databases, and generate the necessary sql to amend the tables in test
accordingly?

Querying the pg_catalog/information_schema over the two db's should give
you the table ddl from which you can diff, and then generate the alter
statements from the results.

Cheers

Martin

From: Bradley Holbrook [mailto:operations_bradley(at)servillian(dot)ca]
Sent: 18 January 2011 16:57
To: French, Martin
Cc: pgsql-admin(at)postgresql(dot)org
Subject: RE: [ADMIN] Postgres Backup Utility

Well, I can't just go dropping and recreating tables... it needs to
create the correct alter statements if existing tables and or functions
already exist.

Secondly, when I'm finished changing the structure, I need to be able to
select the list of tables that will have content updates.

Using a script might be more work maintaining then it's worth. I have a
backup utility that can do the job, but 3 tedious steps per schema, that
only work about 10% of the time (and no batching options so that I can
create a list of actions and run the list).

From: French, Martin [mailto:frenchm(at)cromwell(dot)co(dot)uk]
Sent: January-18-11 5:47 AM
To: Bradley Holbrook; pgsql-admin(at)postgresql(dot)org
Subject: RE: [ADMIN] Postgres Backup Utility

I'm assuming that this needs to be tightly controlled and as such a
replication tool is out of the question?

In that case; The first thing to pop into my head here would be to use
either use shell scripting, or to use the pg API and write a c program
to handle it.

I remember doing something very similar with Oracle a few years back.

Cheers

Martin

From: pgsql-admin-owner(at)postgresql(dot)org
[mailto:pgsql-admin-owner(at)postgresql(dot)org] On Behalf Of Bradley Holbrook
Sent: 18 January 2011 00:08
To: pgsql-admin(at)postgresql(dot)org
Subject: [ADMIN] Postgres Backup Utility

Hello!

First day on the new mailing list as I have need of some expert's
advice.

I need to be able to quickly apply the structure updates from a
development database to a testing database, and do selective data
updates (like on lookup tables, but not content tables).

Any help would be appreciated!

Brad

___________________________________________________

This email is intended for the named recipient. The information
contained
in it is confidential. You should not copy it for any purposes, nor
disclose its contents to any other party. If you received this email
in error, please notify the sender immediately via email, and delete
it from your computer.

Any views or opinions presented are solely those of the author and do
not
necessarily represent those of the company.

PCI Compliancy: Please note, we do not send or wish to receive banking,
credit or debit card information by email or any other form of
communication.

Cromwell Tools Limited, PO Box 14, 65 Chartwell Drive
Wigston, Leicester LE18 1AT. Tel 0116 2888000
Registered in England and Wales, Reg No 00986161
VAT GB 115 5713 87 900
__________________________________________________

___________________________________________________

This email is intended for the named recipient. The information contained
in it is confidential. You should not copy it for any purposes, nor
disclose its contents to any other party. If you received this email
in error, please notify the sender immediately via email, and delete it from
your computer.

Any views or opinions presented are solely those of the author and do not
necessarily represent those of the company.

PCI Compliancy: Please note, we do not send or wish to receive banking, credit
or debit card information by email or any other form of communication.

Cromwell Tools Limited, PO Box 14, 65 Chartwell Drive
Wigston, Leicester LE18 1AT. Tel 0116 2888000
Registered in England and Wales, Reg No 00986161
VAT GB 115 5713 87 900
__________________________________________________

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Bob Lunney 2011-01-19 19:13:56 Re: Postgres Backup Utility
Previous Message Bradley Holbrook 2011-01-18 16:57:07 Re: Postgres Backup Utility