Search Postgresql Archives

pg_dump from Java or SQL?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

 


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux