First, thank you to those who support open-source software. If the maintainers decide this is not something that should be supported, then thank you for reading and feel free to close this.
Summary: rsync supports globbing and selecting more than one file/folder to sync. Grsync is generating the correct rsync commands to support this as well, however there is something happening under the hood that changes the exact command being executed. All I'm asking for is the ability to select more than one folder to sync in a directory with many folders that I don't want to sync.
Bug: Grsync doesn't support globbing that rsync normally supports.
Example I want to move everything in the source
folder to the destination
folder. I use grsync to generate the below command:
rsync -r -t -v --progress --partial -s --stats -h /path/to/source/* /path/to/destination/
However when it is executed it clearly is interpreting *
as a literal, rather than globbing and interpreting *
as a wildcard character.
rsync: link_stat "/path/to/source/*" failed: No such file or directory (2) rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1196) [sender=3.1.2]
My attempts to resolve this
I found where the rsync process is being spawned here. I looked at the kinds of strings it was generating from the argv array, and they seemed normal. I could copy-paste those into bash and they would execute. I modified this array to read different variations of:
/bin/bash -ic 'rsync -r -n -t -v --progress -s /path/to/source/* /path/to/destination '
...and it then gave the error
-r: unexpected EOF while looking for matching `'' -r: syntax error: unexpected end of file
... despite the fact that this command itself looks to be normal (two single-quotes).
Maybe there's a function that can do the path expansion for us, but really it would be nice to use a shell to do the globbing like normal. For now I'm timed out on the issue and maybe I'll look into it later.
Hello,
The globbing is done by the shell, not rsync.
Grsync does not run rsync through a shell for various reasons.
I plan to add this in the future, as an option for whoever needs wildcards.
Thanks for reporting.