It seems rsync won't like using wildcharacters.
for i in `cat /opt/apps/scripts/repos`; do cd $BACKUPLOC/$i; sleep 1; rsync -qauz --ignore-existing *.dump <server_name>:/opt/apps/backuptarget/$i; done
One strange thing I observed is that, if the dump file name is a plain text without any wildcards/trailing slashes, it works pretty cool, but if I happen to have any ": -" it consider's that as a trailing character \.
File name looks something like this,
In this case, rsync fails to transfer the file, and throws the error which I mentioned in the last line.
I am getting the below error, when i try to run my script,
rsync: link_stat "/opt/apps/repobackup/test2/test2*" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1039) [sender=3.0.6]