Synchronization Solution on Windows (RSYNC)

Synchronization Solution on Windows (RSYNC)

June 9, 2023 · 5 min · 1044 words · King Tam

RSYNC USAGE

Introduction Rsync is an open-source application that provides fast incremental or mirror backup by leveraging built-in data deduplication algorithms. It is included in almost all Linux distributions. Features Can update whole directory trees and filesystems Optionally preserves symbolic links, hard links, file ownership, permissions, devices and times Requires no special privileges to install Internal pipelining reduces latency for multiple files Can use rsh, ssh or direct sockets as the transport Supports anonymous rsync which is ideal for mirroring Basic Use rsync -option source/ destination/ Option Description -v Verbose mode, outputs detailed information -r Recurse into directories -a Archive mode (-rlptgoD, no -A, -X, -U, -N, -H) -h Output numbers in a human-readable format -z Use compression to transfer data -e Specify the remote shell to use -P Same as –partial –progress -W Copy files whole (without delta-xfer algorithm) –progress Show progress during transfer –delete Delete extraneous files from destination directories –remove-source-files Sender removes synchronized files (non-dir) –exclude=PATTERN Exclude files matching PATTERN –include=PATTERN Don’t exclude files matching PATTERN –copy-as=USER[:GROUP] Specify user and optional group for the copy –chmod=CHMOD Affect file and/or directory permissions Samples rsync -avh /home/user/data/ /mnt/backup Copy /home/user/data/ (as source directory) to /mnt/backup (as destination directory), using the options -avh....

June 8, 2023 · 5 min · 1049 words · King Tam