Outils pour utilisateurs

Outils du site


tech:notes_rsync

Différences

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

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
tech:notes_rsync [2025/04/10 10:10] Jean-Baptistetech:notes_rsync [2025/10/17 16:26] (Version actuelle) Jean-Baptiste
Ligne 52: Ligne 52:
  
 ~~~bash ~~~bash
-sshfs -d -o allow_other,ro -o reconnect -o ServerAliveInterval=15 root@192.168.2.12:/var/www /data -p 12345 -C+sshfs -o allow_other,ro -o reconnect -o ServerAliveInterval=15 root@192.168.2.12:/var/www /data -p 12345 -C
 ~~~ ~~~
  
-sshfs -o ro server:/ ~/mnt/plop+Pour debug ajouter l'option ''-d'' 
 +~~~bash 
 +sshfs -d -o allow_other,ro -o reconnect -o ServerAliveInterval=15 root@192.168.2.12:/var/www /data -p 12345 -C 
 +~~~
  
 ### Gros fichiers avec plein de zéros, iso... ### Gros fichiers avec plein de zéros, iso...
Ligne 78: Ligne 81:
 rsync -ax /mnt/usb_disk/ /mnt/usb_disk2/ rsync -ax /mnt/usb_disk/ /mnt/usb_disk2/
 ~~~ ~~~
 +
 +
 +### Utilisation de l'option --files-from
 +
 +~~~bash
 +rsync -anv --files-from=push.lst / /tmp/plop/
 +~~~
 +
 +
 +### rsync avec find
 +
 +~~~bash
 +# rsync --files-from=<(find ~/DATA/ -type f -name '*.txt' -printf "%P\n") ~/DATA/ ~/DATA2/
 +# find ~/DATA/ -name '*.txt' -printf %P\\0 | rsync --files-from=- --from0 ~/DATA/ ~/DATA2/
 +
 +cd ~/DATA/
 +find . -type f -name '*.txt' -exec rsync -av -R {} ~/DATA2/ \;
 +~~~
 +
 +
 +
  
 ### Diff - diffing  ### Diff - diffing 
Ligne 87: Ligne 111:
 Équivalent avec rsync Équivalent avec rsync
 ~~~bash ~~~bash
-rsync -rcvn --delete --exclude='.git' --exclude='.gitlab' projet_plop_fork/ projet_plop_orig/+rsync -rcvn --delete --exclude='.git' --exclude='.gitlab' --itemize-changes projet_plop_fork/ projet_plop_orig/
 ~~~ ~~~
  
Ligne 153: Ligne 177:
 ~~~bash ~~~bash
 /usr/bin/ionice -c2 -n7 rsync -axvn --bwlimit=20480 /home/jean/ backup1:/data/bck1/home/jean/ /usr/bin/ionice -c2 -n7 rsync -axvn --bwlimit=20480 /home/jean/ backup1:/data/bck1/home/jean/
 +
 +# systemd-run -p IOWeight=10 rsync -axvn --bwlimit=20480 /home/jean/ backup1:/data/bck1/home/jean/
 ~~~ ~~~
  
tech/notes_rsync.1744272643.txt.gz · Dernière modification : de Jean-Baptiste

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki