Hi all, I'm trying to made a filtered backup of a windows PC. My target is to create a recursive backup of "only" files reported in the include/exclude files (i.e. only *.txt). the rules (reported below) work well, but also create an empty folders structure that I don'want.
Rsync works fine for me (the rules are reported below) except a point, rsync create an empty folders structure that I don'want. I'm trying to explain better. Suppose that the source folder is: ./source/a.txt ./source/afolder ./source/afolder/b.txt ./source/afolder/c.doc ./source/bfolder/ ./source/bfolder/a.doc ./source/bfolder/ ./source/bfolder/cfolder/ ./source/bfolder/cfolder/e.doc . I used the following syntax: rsync -avz --delete-excluded ./source/ ./dest --exclude-from=exclude.txt where the rules in the exclude.txt are: + *.txt + */ - * rsync create in the dest folder: ./dest/a.txt ./dest/afolder ./dest/afolder/b.txt ./dest/bfolder/ ./dest/bfolder/cfolder/ Please note if I omit the rules "+ */", I cannot fetch recursively the folders and thus the ./source/afolder/b.txt file. I misleading anything? There is anyway to exclude the creation of the empty folders? My environment is: Win XP Pro SP2 rsync 2.6.4 (from cygwin) Thanks in advantage, Luca -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html