The PostgreSQL backup, restore, vacuum, and reindex utilities are all included in Komo, a basic Java (Eclipse rcp) GUI. You can look at the code and adapt it to your application. Komo can be accessed and downloaded at pgFoundry
Read and understand the file 'src/bin/pg_dump/pg_dump.c' in the postgresql core server code base. This is the only solution of your problem, you are going to rewrite all the C code in JAVA.
On 11/27/06, tommaso.taruffi@ricesoft.it <tommaso.taruffi@ricesoft.it> wrote: > Hello, > I have a question about how I can make a database backup > with Java. I have made a class Connection.java that connect > my application with Postgresql Database. I would make a > function in this class for backup the state of the database. > Anyone can help me? > > Thanks! > Dr. Tommaso Taruffi > > ---------------------------(end of broadcast)--------------------------- > TIP 7: You can help support the PostgreSQL project by donating at > > http://www.postgresql.org/about/donate >
---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings