GMAIL wrote:
> i describe the situation:
> i have two pc with postgressql server:
> - a main pc, with ip 192.168.5.1 turned on
> - a "backup" pc, with ip 192.168.5.1 turned off
>
> i want that the main pc saves the database in local hard drive and on
a
> nas real-time. when the main pc has a failure, i turn on, manually,
the
> secondary pc, that reads the database from the nas
>
> how i can do that?
What do you want to guard against? Hardware outage?
Software bugs?
I don't think that the scenario you describe is possible.
There are other, maybe better ways:
1) Have the database on NAS and use storage mirroring.
NAS in that case means NFS (hard mount!), *not CIFS*.
That will help against hardware outage, but not against
filesystem or database corruption.
2) Use a standby database with streaming replication.
That will also help with filesystem and database
corruption.
Yours,
Laurenz Albe