The oc rsync
command exposes fewer command line options than standard rsync
.
In the case that you wish to use a standard rsync
command line option which is
not available in oc rsync
(for example the --exclude-from=FILE
option), it
may be possible to use standard rsync
's --rsh
(-e
) option or RSYNC_RSH
environment variable as a workaround, as follows:
$ rsync --rsh='oc rsh' --exclude-from=FILE SRC POD:DEST
or:
$ export RSYNC_RSH='oc rsh' $ rsync --exclude-from=FILE SRC POD:DEST
Both of the above examples configure standard rsync
to use oc rsh
as its
remote shell program to enable it to connect to the remote pod, and are an
alternative to running oc rsync
.