Re: Fwd: Hdup feature suggestion
Miek Gieben <[email protected]> Fri, 29 Oct 2004 11:20:00 +0200
| Newsgroups | gmane.comp.sysutils.backup.hdup.general |
|---|---|
| Message-ID | <[email protected]> |
Guys, thanks for the input. This is what I have come up with: I want this to be as simple as possible, so that even I can use it :) * directory traversal: write my own - it's trivial, and that way I get more flexibility. (I already stole some code of net :) ) (First all files in a dir are processed, to look for a .nobackup file, then the directories) * patterns: (stole the first two from rsync) - if the pattern starts with a / then it is matched against the start of the filename, otherwise it is matched against the end of the filename. This is the equivalent of a leading ^ in regular expressions. Thus "/foo" would match a file called "foo" at the transfer-root (see above for how this is different from the filesystem-root). On the other hand, "foo" would match any file called "foo" anywhere in the tree because the algorithm is applied recursively from top down; it behaves as if each path component gets a turn at being the end of the file name. - if the pattern ends with a / then it will only match a directory, not a file, link, or device. - man 3 regcomp. That is, POSIX compliant regular expressions. - include preceeds exclude * Configuration nobackup = .nobackup if specified it will be used. If not specified it will not be used. I don't want to look at the contents. If it's there the directory and all child-dirs will be excluded. grtz Miek