Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Sep 2002 19:45:36 +0200 (MEST)
From:      Michael Grant <mg-fbsd3@grant.org>
To:        freebsd-questions@freebsd.org
Subject:   automating backups of files
Message-ID:  <200209201745.g8KHjZ521770@splat.grant.org>

next in thread | raw e-mail | index | archive | help
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 majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200209201745.g8KHjZ521770>