Postgres backup

Поиск
Список
Период
Сортировка
От pd
Тема Postgres backup
Дата
Msg-id 1159762812.810912.111310@m73g2000cwd.googlegroups.com
обсуждение исходный текст
Ответы Re: Postgres backup  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-general
guys,

i have a java web app with a postgres backend. now i want to implement
a db database functionality from within my web app. now i have got
this so far,

String[] args = {"\"C:\\Program
Files\\PostgreSQL\\8.1\\bin\\pg_dump\"", " -i", " -h", " localhost", "
-p", " 5432", " -U", " postgres", " -F", " t", " -b", " -v", " -f", "
\"C:\\Test.backup\"", " TESTDB"};

String result = "";
if (args.length > 0) {
       result = args[0];    // start with the first element
       for (int i=1; i<args.length; i++) {
       result = result + args[i];
      }
}

Process p = Runtime.getRuntime().exec(result);

Now on executing this i am getting a file called Test.backup, but its
0KB compeletely empty. can somebody tell me what i am doing wrong and
how can i fix it. somebody also told me that this is not the best way
of doing this, and i was wondering is there a better way of
implementhing this.

Thanks.


В списке pgsql-general по дате отправления:

Предыдущее
От: "rlee0001"
Дата:
Сообщение: Re: Normal vs Surrogate Primary Keys...
Следующее
От: "Iulian Manea"
Дата:
Сообщение: Advantages of postgresql