Select files for incremental indexing
"Dmitri V. Ivanov" <[email protected]> Tue, 3 Oct 2006 11:43:44 -0700 (PDT)
| Newsgroups | gmane.comp.web.swish-e |
|---|---|
| Message-ID | <[email protected]> |
Hi, peoples! You are doing great work. But I have found that Your program doesn't have the right way to select files for incremental indexing. Using -N switch for indexing files newer than supplied one is a wrong way for POSIX filesystem in much cases: 1-st is renamed directory: when You rename some part of path to file (like dir1/dir2/dir3/file -> dir1/dir2newname/dir3/file) no timestamps associated with file is updated. Method with symlinks is also wrong: let's assume we have two directories with files of same name at it (dir1/dir2/file and dir1/dir3/file) then renamed dir1/dir2 -> dir1/dir4 and dir1/dir3 -> dir1/dir2. Your symlinks doesn't help with it. 2-nd is that mtime can be changed by utimes() syscall and if You unpack tarball into your tree it will use it. With POSIX systems we need use ctime instead of mtime. With windows backup software uses 'archieve' attribute (windows have 'file creation time' instead of ctime). There is a method to solve thiese issues with POSIX filesystems, and I don't know method for windows. This method is used in GNU tar (see option --listed-incremental from info tar). I can add more details and some nightmare-quality script in perl if it seems interesting to You (really I think it must be rewritten in C). WBR Dmitri Ivanov