Re: Backup and restore through JDBC

From: Tom Dunstan <pgsql(at)tomd(dot)cc>
To: Markus Schaber <schabi(at)logix-tt(dot)com>
Cc: Marlon Petry <marlonpetry(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Backup and restore through JDBC
Date: 2006-09-29 14:00:43
Message-ID: 451D270B.6040205@tomd.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Markus Schaber wrote:
> Marlon Petry wrote:
>> But I would need to have installed pg_dump and pg_restore in machine
>> client?
>> Without having installed pg_dump and pg_restore,how I could make
>
> pg_dump and pg_restore should be runnable (possible with a small shell /
> bash wrapper script) without any "installation", simply having them and
> all neded libs lying in the current directory.

There's probably a case for having static builds of pg_dump and
pg_restore around for various architectures, if only to help people out
when they don't have access to a build environment etc. Either a set of
static binaries on the website, or an easy way to build them from the
source tree (they could then be copied to the target system).

It strikes me that Marlon hasn't really explained why he wants to use
JDBC. I assume that your application is Java based, but trust me,
invoking pg_dump through Runtime.exec() or whatever is going to be much,
much easier than any of the other things you've suggested, such as
making a pg_dump API and using JNI to call it. That's just pain city, in
a bunch of ways.

Do you need to process the dump inside your program in some way? Or do
you just need to store a dump and restore it later? Why the fascination
with using an API?

> On a unix box, when you're really crazy, and want to ignore all security
> restrictions, you could even install pg_dump via inetd, and then
> everyone connecting via TCP on the appropriate port gets a dump of the
> database. :-)

Oh, man, my head just exploded reading that. That's taking evil and
being *creative* with it. :)

Cheers

Tom

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Teodor Sigaev 2006-09-29 14:02:06 Re: pgsql: Fix IS NULL and IS NOT NULL tests on row-valued
Previous Message Heikki Linnakangas 2006-09-29 13:54:58 Re: Block B-Tree concept