linux:rsync

This is an old revision of the document!


RSYNC

Сделать копию

#RSYNC
 
# Reception PUB
rsync -rlptgoPv --exclude '!trash' --exclude 'frontend_test' /mnt/frontend/ root@10.59.0.80:/mnt/frontend/
# Reception Store
rsync -rlptgoPv /mnt/backend/www/pdn_store/  root@10.59.0.81:/mnt/backend/www/pdn_store/

Проверить каталоги на предмет изменение содержания

#Using rsync to verify the integrity of a duplicate
#To guarantee that this test physically re-reads the files from the drive media, I suggest powering-down both drives and restarting them before running this test. 
# This  will clear their internal volatile caches.
sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches'
 
#Then to re-read both trees and compare their checksums:
 
rsync --dry-run --checksum --itemize-changes --archive SRC DEST
#Modern rsync checksum uses MD5, which is 128 bits. The likelihood of this failing to detect an error in an individual file is astronomically low (some discussion here), #but not impossible.
 
#example
rsync -a --itemize-changes --checksum --dry-run /var/www/dokuwiki/data/pages/ /opt/docker-dokuwiki/www/data/pages/
-- https://unix.stackexchange.com/questions/3575/display-transfer-speed-when-performing-cp-from-the-command-line
rsync --progress source destination
pv -p file1 > file2

  • linux/rsync.1664505319.txt.gz
  • Last modified: 2022/09/30 02:35
  • by admin