[PLUG] open files...

plug_0 at robinson-west.com plug_0 at robinson-west.com
Thu Feb 15 00:31:46 UTC 2007


How about a bash daemon that wakes up every 10 minutes and backs up
my postgresql database.  What about open files?  I don't want to shut the
database down every 10 minutes.

If postgres is being accesssed and a file is being written at the same time
I am trying to copy that file for backup purposes, is the result defined?

Instead of trying to make a backup every 10 minutes, another approach
is to watch for file access and if the operations on the files being
accessed don't complete, roll them back.  Requires you have a copy of
the specific pre modified files to roll back to.

The database program is running on a machine that is diskless and
not power protected.  The database file system is an NFS volume
that is power protected.  Am I going to be forced to throw a cheap
battery backup unit onto the diskless machine to prevent
corruption?

What might work is a network file system that works differently than
NFS.  When the database wants to change file X, it can't overwrite it
directly.  Instead, this file system would let the database change
a copy of file X that is elsewhere and on success of that operation,
modify the actual file safely.  For this to work right, I think
that further access to that file has to be prevented until the
current transaction is complete.

A last option that comes to mind is running the database on a
ram drive so that essentially I start with a copy that works on
every reboot.  I might change some user's horde preferences.
Perhaps email attachments could be lost that are stored in the
database but not the initial image.

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.




More information about the PLUG mailing list