rsync
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rsync [2012/05/30 19:46] – javi | rsync [2024/11/14 18:05] (current) – [Subtituyendo a scp reanuda en caso de corte] jose | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== rsync ====== | ||
+ | |||
+ | ===== Subtituyendo a scp reanuda en caso de corte ===== | ||
+ | rsync --partial --progress -e ssh archivo.txt usuario@192.168.1.100:/ | ||
+ | |||
+ | Simplificando: | ||
+ | rsync -P -e ssh archivo.txt usuario@192.168.1.100:/ | ||
+ | -P: combina las opciones --partial y --progress en una sola, simplificando así la escritura. | ||
+ | |||
+ | copy remote | ||
+ | |||
+ | Mirar inotify que solo lanza eventos cuando hay modificación en ficheros para evitar rsync en cron | ||
+ | |||
+ | ===== Receta 1 ===== | ||
+ | |||
http:// | http:// | ||
Line 11: | Line 26: | ||
-r recursive into subdirectories\\ | -r recursive into subdirectories\\ | ||
-v verbose | -v verbose | ||
+ | |||
+ | ===== Receta 2 ===== | ||
+ | |||
+ | < | ||
+ | #!/bin/bash | ||
+ | |||
+ | SOURCE="/ | ||
+ | DESTINATION="/ | ||
+ | LOG="/ | ||
+ | RSYNC="/ | ||
+ | PORT=" | ||
+ | # Requires previous ssh keys exchange | ||
+ | # http:// | ||
+ | USER=" | ||
+ | REMOTE_HOST=" | ||
+ | |||
+ | DATE=" | ||
+ | |||
+ | echo " | ||
+ | ################### | ||
+ | |||
+ | $RSYNC -arv --no-implied-dirs --ignore-errors --rsh "ssh -p$PORT" | ||
+ | |||
+ | DATE=" | ||
+ | |||
+ | echo " | ||
+ | ################### | ||
+ | </ | ||
+ | |||
+ | ===== Copiar evitando directorios de subversion ===== | ||
+ | |||
+ | rsync -r --exclude=.svn / | ||
+ |
rsync.1338407214.txt.gz · Last modified: 2015/04/13 20:19 (external edit)