Pb rsync

protocol version mismatch

http://ss64.com/bash/rsync.html

# rsync -axP acme:/var/www/ ~/backup/www
protocol version mismatch -- is your shell clean?
(see the rsync man page for an explanation)
rsync error: protocol incompatibility (code 2) at compat.c(176) [Receiver=3.1.1]

ssh acme /bin/true > out.dat

Le fichier out.dat doit être vide. Si ce n'est pas le cas

Exemple :

J'ai dû modifié mon .bashrc (de Acme) comme suit : .bashrc

bin/start.sh

.bashrc

if [ $TERM == 'xterm' ] then bin/start.sh fi

A tester : --no-motd

Err - No space left on device - but work if remove

Voir :

https://superuser.com/questions/1776098/rsync-no-space-left-on-device-although-plenty-of-space-available

find ./app?/L*/log/ -type f -print0 | rsync -e \"ssh -o StrictHostKeyChecking=no -o CheckHostIP=no -p 22 -i /home/app_a/.ssh/id_l_sync_hst1 \" --bwlimit="5000" -c --itemize-changes --files-from=- --from0 "/home/app_a" "l_sync_hst1"@"192.168.1.44":"/home/l_sync_hst1/data/"

cd+++++++ app1/
cd+++++++ app1/L12/
cd+++++++ app1/L12/log/
<f+++++++ app1/L12/log/plop.csv
<f+++++++ app1/L12/log/out.0

<fcsT.... app1/L12/log/out.0
rsync: [receiver] write failed on "/home/l_sync_hst1/data/app1/L12/log/out.0": No space left on device (28)
rsync error: error in file IO (code 11) at receiver.c(379) [receiver=3.2.5]
rsync: connection unexpectedly closed (29554 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(463) [sender=2.6.8]

Mais fonctionne si

sftp -o IdentityFile=/home/pcc/.ssh/id_l_sync_hst1 id_l_sync_hst1@192.168.1.10 <<EOF
rm data/app1/L12/log/out.0
EOF

Solution

Ajouter --inplace

find ./app?/L*/log/ -type f -print0 | rsync -e \"ssh -o StrictHostKeyChecking=no -o CheckHostIP=no -p 22 -i /home/app_a/.ssh/id_l_sync_hst1 \" --bwlimit="5000" -c --inplace --itemize-changes --files-from=- --from0 "/home/app_a" "l_sync_hst1"@"192.168.1.10":"/home/l_sync_hst1/data/"