Originally Posted by rayalab
I am trying to sync all files from one server to another server. This is continuous process daily.
Somehow I have few hidden folders in which there are few files too. I don't need these hidden folders and files which are inside. So I have to exclude them.
java creates rsync command for each n every file which are there in source server.
rsync -vrlt --exclude=".dav" --exclude=".dav/*" server1:/abc/.dav/a.txt .
This .dav is a hidden folder. I don't need any files under this directory. I have used above exclude patterns.But didn't work.
Please help me in this case how can I exclude file under hidden directory eventhough the file has been picked up.
It is really not very clear what you are trying to do, or what you mean by "picked up".
What does java have to do with it? Does a java application generate the rsync commands? If so, what application and how does it fit into the rsync process, exactly?
You say that you don't want to copy any files under the .dav/ directory, yet your rsync source is exactly a file in that directory.
It does not actually sound like an rsync problem, but more like a command generation problem. Please try to explain more clearly how this is supposed to work overall, not just the rsync commands, and include actual examples if possible.