Outils pour utilisateurs

Outils du site


tech:pb_rsync

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
tech:pb_rsync [2025/03/24 15:06] – créée - modification externe 127.0.0.1tech:pb_rsync [2025/07/08 10:48] (Version actuelle) Jean-Baptiste
Ligne 1: Ligne 1:
-{{tag>Brouillon Pb FS Sauvegarde}}+<!DOCTYPE markdown> 
 +{{tag>Brouillon Pb FS Sauvegarde rsync}}
  
-Pb rsync protocol version mismatch+Pb rsync 
 + 
 +## protocol version mismatch
  
 http://ss64.com/bash/rsync.html http://ss64.com/bash/rsync.html
  
-<code ->+~~~
 # rsync -axP acme:/var/www/ ~/backup/www # rsync -axP acme:/var/www/ ~/backup/www
 protocol version mismatch -- is your shell clean? protocol version mismatch -- is your shell clean?
 (see the rsync man page for an explanation) (see the rsync man page for an explanation)
 rsync error: protocol incompatibility (code 2) at compat.c(176) [Receiver=3.1.1] rsync error: protocol incompatibility (code 2) at compat.c(176) [Receiver=3.1.1]
-</code>+~~~
  
-<code bash>+~~~bash
 ssh acme /bin/true > out.dat ssh acme /bin/true > out.dat
-</code>+~~~
  
 Le fichier ''out.dat'' doit être vide. Si ce n'est pas le cas Le fichier ''out.dat'' doit être vide. Si ce n'est pas le cas
Ligne 21: Ligne 24:
  
 J'ai dû modifié mon ''.bashrc'' (de **Acme**) comme suit : J'ai dû modifié mon ''.bashrc'' (de **Acme**) comme suit :
-<code bash .bashrc>+''.bashrc'' 
 +~~~bash
 bin/start.sh bin/start.sh
-</code>+~~~
  
-<code bash .bashrc>+''.bashrc'' 
 +~~~bash
 if [ $TERM == 'xterm' ] if [ $TERM == 'xterm' ]
 then then
         bin/start.sh         bin/start.sh
 fi fi
-</code>+~~~
  
 A tester : ''--no-motd'' 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
 +
 +~~~bash
 +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''
 +~~~bash
 +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/"
 +~~~
  
  
  
tech/pb_rsync.1742825205.txt.gz · Dernière modification : de 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki