I'd like to write something to automatically backup files as they
change on disk.  Perhaps not every byte, but say at reasonable
intervals and especially when a file is closed.

Does anyone know of any way I could get an indication in a userland
process when an arbitrary file has been opened, closed, or modified?

I can imagine a special device which I read which just feed me things
like:

/foo/bar  modified
/bar/baz  close

Before everyone bombards me with comments that I'm being completely
stupid, I have my reasons for wanting to do this rather than using
RAID to create a mirror.

What I really want would certainly be best done if I were to write my
own file system.  But I don't have the time to do that right now.
I've been looking long and hard for a sort of roll-back filesystem,
but I've never seen this for unix.

So, I'd like to create something somewhat close.  What I want to do
today is backup a file in many different states rather than just once
per day.  To do that, I need to know when the files change, rather
than scanning through the entire file system constantly, hence my
question.

I realize that there's going to be some overhead to do this, but I
suspect that the amount of overhead isn't going to be that much
greater than say using RAID to mirror.

Ideas and comments welcome...

Michael Grant



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to