How do I use rsync filters for backup?
I'm trying to figure out how to use rsync and the filter rules to backup some of my directories. like /home and /etc.
I tried a test with a few of my home directories. I was trying to copy the health and knives directories with contents.
rsync -av --filter='merge /home/joe/filter-rule' documents/ test
which is what I found in the man page, as well as looking on the net for articles. This copied all the directories from documents with nothing in them.
I used this as filter-rule:
If I use +* for the first line it copies everything.
What am I missing; how do I just copy the directories and contents that I want.