On Thu, 6 Dec 2001, Matthijs van der Klip wrote:
> On Thu, 6 Dec 2001, Ivan Rayner wrote:
> > I think you'd be better off monitoring the ftp log to see what files have
> > changed and then use rsync on those. I'm sure it'd be fairly easy to do
> > this in something like perl.
>
> Problem with this is the information contained in the ftp logs itself by
> default is not sufficient:
>
> 1) I can use the xferlog, but this contains only xfers, no mkdir's, chmod's
> etc. Moreover spaces in filenames are replaced by underscores so the log
> essentialy contains invalid filenames.
>
> 2) I can use the ftp command log, but this contains literal ftp commands,
> which I would have to parse in order to filter the information I need. It
> doesn't even contains full pathnames to files...
>
> Ofcourse this could be solved by hacking the ftp daemon so it writes the log
> I want it to, but I'm not convinced this is the way to go.
Another idea...
IRIX has thing called fam (file aleteration monitor) which can notify apps
when files or directories are changed. fam has been ported to Linux, so
you could possibly write a small program that uses the fam API and can
start rsyncs as files are changed or added, etc.
See http://oss.sgi.com/projects/fam/
fam consists of a useland daemon called fam, and a kernel patch called
imon (inode monitor). I'm not sure what the current state of the kernel
patch is, but it might be worth seeing if you can get this going.
fam/imon are not filesystem specific.
There's a link from the fam faq to a project that looks just like what you
want:
http://www.nas.nasa.gov/Groups/WWW/subpages/topology.html
HTH,
Ivan
--
Ivan Rayner
ivanr@xxxxxxx
|