The Samba-Bugzilla – Bug 10449
Allow testing of supported parameter(s)
Last modified: 2014-02-14 22:34:12 UTC
In newer versions of rsync there are many desirable features that simply aren't available in older versions, but unfortunately some systems continue to be bundled older versions of rsync.
I'd like to recommend a special rsync mode which will attempt to perform a compatibility check for particular features. Of course this will only work for newer versions, but at least it should then fail when used with an older version and thus still provide useful feedback.
Quite simply I'd like to suggest either an extension of the --help or --version flag, whereby any additional parameters are treated as features to be tested for. If source and destination parameters are also provided, then these will be used for determining which features are available between the source and target specifically (i.e - it will check with a remote system if able to do-so).
rsync --version --delete-during --ignore-case ~/Foo firstname.lastname@example.org:/Foo
This would attempt to determine whether the "delete-during" and "ignore-case" switches are available for a transfer between the local volume and email@example.com. If all listed features are supported then it will return a particular status code (for compatibility with current versions this shouldn't be 0), otherwise it will return a different status and will print to stdout a list of unsupported features, so the script knows not to use these when performing the actual transfer operation.