I have a dir with files and dirs in it. What I want is to make rsync copy of several folders from that dir. For example, lets say I have this:
/home/user
-- drwxr-xr-x folderA
-- drwxr-xr-x folderB
-- drwxr-xr-x folderC
-- -rw-r--r-- file.1
-- -rw-r--r-- file.2
I want to copy folderA and folerB using rsync. I have created file rsync_folders.txt
+ /folderA/**
+ /folderB/**
My problem is that rsync will always copy file unless it matches exclude pattern. But if I add
- /**
nothing is copied because rsync first matches against exclude patterns.
Any ideas?
Note: I cannot list all folders and files I want to exclude. It will be changing from time to time.