From: | "Campano, Troy" <Troy(dot)Campano(at)LibertyMutual(dot)com> |
---|---|
To: | "Postgres general mailing list" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Backup and Restore of PostgreSQL |
Date: | 2004-06-07 15:27:15 |
Message-ID: | 82C3FD729CFA504CA44E7D32BDED411F0A2EFA06@lm-exmsg-07.lm.lmig.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Easiest thing to do is to call pgsql from your servlet, have it dump the
file somewhere in your web apps directory, and then either send the link
to that file to the client or automatically forward the client there.
Option 2 would be to use JDBC to view the meta data of the table and use
it to write "CREATE" statements, and then build inserts from this data,
but this would be very time consuming and difficult to do.
Thanks!
~ Troy Campano ~
-----Original Message-----
From: pgsql-general-owner(at)postgresql(dot)org
[mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of Richard Huxton
Sent: Monday, June 07, 2004 9:57 AM
To: Tim Penhey
Cc: pgsql-general
Subject: Re: [GENERAL] Backup and Restore of PostgreSQL
Tim Penhey wrote:
> Richard Huxton mentioned:
>
>>
>>The pg_dump utility is the standard way to backup PostgreSQL and the
>>custom format is already compressed.
> The question though is how to call this from a java servlet /
hopefully in a OS
> independant way.
Well, obviously file-paths can be dealt with simply, and pg_dump will
output to a named file, so you're ok there.
As for safely calling external programs, that's probably more a question
for the servlet system (Tomcat I think you said) - it's not different to
calling any other external program.
--
Richard Huxton
Archonet Ltd
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-06-07 15:48:37 | Re: contents of pg_database vanished.. |
Previous Message | Kari Lavikka | 2004-06-07 15:10:43 | contents of pg_database vanished.. |