Re: Separating application from data - Mailing list pgsql-general

From Richard Huxton
Subject Re: Separating application from data
Date
Msg-id 40BC4DF8.4030403@archonet.com
Whole thread Raw
In response to Separating application from data  (Ago <ago@nmb.it>)
List pgsql-general
Please CC: the mailing list too, other people might have something
useful to say.

NMB Webmaster wrote:
> It is for backup purpose. I thought that in this way I could backup
> only data and structure of all my databases from one machine without
> backuping the application files that would be on another machine.

The standard backup tool for PostgreSQL is pg_dump - this indeed just
backs up the data. You should not rely on copying the files of a running
database - that won't always work.

> Moreover, if the application server crashes I do not miss my data.

Ah - I think I see what you're trying to do. It's quite common to have
e.g. Apache+PHP/JBoss/etc on one machine and PostgreSQL on another. All
that's required is to turn the tcp connection option on in PostgreSQL
and change the connect string in the application.

Don't forget to update your pg_hba.conf to allow your application to
connect from the remote machine too.

HTH
--
   Richard Huxton
   Archonet Ltd

pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: Insert speed question
Next
From: "Stijn Vanroye"
Date:
Subject: Re: Large table search question