#!/bin/bash
# SSHelper rsync-server runs on handy
# start connection by client rsync on PC
# 200723

pwd_path=`pwd`
incl_excl_from=--exclude-from="$pwd_path/excludes-SSHelper-A40"
## Source-Directory from where files etc. are to be read
src_path="192.168.178.45:/sdcard/"  # = Hauptspeicher ! nicht SD-Karte !
#src_path="192.168.178.45/sdcard/DCIM/OpenCamera/"  # = Hauptspeicher ! nicht SD-Karte !
## Destination-Directory to which files etc. are to be wrote
dest_path="/media/sdb2/SIK/SIK-Android-DATA-A40/"
dest_dir="DATA-rsync-01/"
rsync_options="-zzav --update --progress $incl_excl_from --log-file=DATA-rsync-01.log"

rsync $rsync_options -e 'ssh -p 2222' $src_path $dest_path$dest_dir   # ok !!!


exit

Errors
======
Err, mit Param "-zz" ok:

rsync: This rsync lacks old-style --compress due to its external zlib.  Try -zz.
rsync error: syntax or usage error (code 1) at /home/lutusp/.termux-build/rsync/src/main.c(1578) [server=3.1.3]
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [Receiver=3.1.1]

not ok: rsync --skip-compress --update --progress -e 'ssh -p 2222' -azv 192.168.178.42:/sdcard/DCIM/OpenCamera/ /media/sdb2/temp/opensshd-tst/
ok: param -zz !
---

err:
#execute="-e 'ssh -p 2222'"  # err when used in var
err: "Unexpected remote arg: 192.168.178.45:/sdcard/DCIM/OpenCamera/
rsync error: syntax or usage error (code 1) at main.c(1348) [sender=3.1.1]"


