Results 1 to 2 of 2
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 03-08-2011 #1Linux Newbie
- Join Date
- Dec 2008
- Posts
- 140
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.
Code: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:
+ */
+ /knives
+ /health
- *
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.
Thanks
- 03-11-2011 #2Linux Newbie
- Join Date
- Dec 2008
- Posts
- 140
I think I've found the answer. For filter rule file:
+ /health/***
+ /knives/***
- *


Reply With Quote
