I would like to mirror only specific files (for example *.jpg), but rsync creates empty directories on the destination host that don't have any *.jpg files in them.
My syntax is:
rsync -arv --include '*/' --include '*.flv' --exclude '*' host_source/ host_dest/
I try to create a file with all paths and file pattern matching *.jpg:
find source/ -iname *.jpg > myfiles.txt /* and I use "sed" to filter the parent path to be OK */
So, now I run:
rsyn -ar --files-from=myfiles.txt host_source/ host_dest/
That works fine; no empty directories are created on "host_dest", but now if there are some files on "host_dest" that should be deleted on "host_source", rsync doesn't delete them.
So how do I tell rsync to "look" ONLY for the file pattern and not create empty directories on the host_dest?
Thanks a lot for answers before I go crazy :)