pg_dump from Java or SQL?

From: "Jason Long" <jason(at)supernovasoftware(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: pg_dump from Java or SQL?
Date: 2005-12-02 21:54:00
Message-ID: 20051202215419.744439DCAD7@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Is it possible to access backup and restore functionality from SQL or Java?
I am attempting to allow some this functionality from a webapp.

The best I have so far is the following Java code.

Runtime runtime = Runtime.getRuntime();

String[] cmd = { "cmd",

"/c",

"C:/PostgreSQL/8.0/pgAdmin_III/pg_dump.exe -i
-h localhost -p 5432 -U postgres -F c -b -v -f C:/"

+(new Date()).getTime()

+".backup mydatabase" };

Process p = runtime.exec(cmd);

Thank you for your time,

Jason Long

CEO and Chief Software Engineer

BS Physics, MS Chemical Engineering

http://www.supernovasoftware.com

Browse pgsql-general by date

  From Date Subject
Next Message Tony Caduto 2005-12-02 22:03:27 was a initdb required from 8.1beta3 -> beta4?
Previous Message Karl O. Pinc 2005-12-02 21:48:09 New.* and old.* as function arguments within rules