I have a big problem in understanding rsync filter rules for sub path. I have this directory tree:
|-- index.php
|-- other-file-php.php
|-- filesource.php
| |-- album1
| | |-- firstphoto.jpg
| | |-- second.jpg
| | |-- index.php
| | `-- thumbs
| | |-- _map.txt
| | |-- _title_ciao.jpg.txt
| | |-- _120_second.jpg
| | |-- _dir_album1.jpg
| | `-- _300_second.jpg
| |-- altre
| | |-- img_1172.jpg
| | |-- album2
| | | |-- index.php
| | | `-- thumbs
| | | |-- _title_img_1172.jpg.txt
| | | |-- _dir_album2.jpg
| | | `-- _guestbook.html
I can only use option -f -filter of rsync, because I must write all rules into one file. In this tree there are different types of files that can be at any level of the tree. I want to:
- have a full backup of the directory structure
- backup all files of type
.php
,.txt
,.html
- backup
.jpg
files that do not begin with_
- backup
.jpg
files that start with_dir