====== RSYNC ======
Сделать копию
#RSYNC
#localcopy with create directory influxdb2 in dst ../docker
rsync -aHAXvh ./influxdb2 ../docker
# 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/
# list elements
# list big elements
\ls -l | awk 'BEGIN{mega=1048576} {if ($5 >= mega) {$5 = $5/mega "MB"; print;}}'
===== RSYNC transfer rate скорость копирования pv =====
## 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:pasted:20211121-044853.png}}