Rsync
≈ 2 min read
Names in other languages
No names in other languages are held for this entry yet.
Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.
rsync (remote sync) is a utility for transferring and synchronizing files between a computer and a storage drive and across networked computers by comparing the modification times and sizes of files. The rsync algorithm is a type of delta encoding, and is used for minimizing network usage. Zlib, Zstd, and LZ4 may be used for additional data compression. One application of rsync is the synchronization of software repositories on mirror sites used by package management systems.
rsync (remote sync) is a utility for transferring and synchronizing files between a computer and a storage drive and across networked computers by comparing the modification times and sizes of files. The rsync algorithm is a type of delta encoding, and is used for minimizing network usage. Zlib, Zstd, and LZ4 may be used for additional data compression. One application of rsync is the synchronization of software repositories on mirror sites used by package management systems. $ rsync -avz --delete ftp4.de.FreeBSD.org::FreeBSD/ /pub/FreeBSD/ The Apache HTTP Server supports rsync only for updating mirrors. $ rsync -avz --delete --safe-links rsync.apache.org::apache-dist /path/to/mirror The preferred (and simplest) way to mirror a PuTTY website to the current directory is to use rsync. $ rsync -auH rsync://rsync.chiark.greenend.org.uk/ftp/users/sgtatham/putty-website-mirror/ . A way to mimic the capabilities of Time Machine (macOS); $ date=$(date "+%FT%H-%M-%S") # rsync interprets ":" as separator between host and port (i.e. host:port), so we cannot use %T or %H:%M:%S here, so we use %H-%M-%S $ rsync -aP --link-dest=$HOME/Backups/current /path/to/important_files $HOME/Backups/back-$date $ ln -nfs $HOME/Backups/back-$date $HOME/Backups/current Make a full backup of system root directory: $ rsync -avAXHS --progress --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} / /path/to/backup/folder Delete all files and directories, within a directory, extremely fast: $ rsync -a --delete /path/to/empty/dir /path/to/dir/to/empty # Make an empty directory somewhere, which is the first path, and the second path is the directory you want to empty.
Text derived from https://en.wikipedia.org/w/index.php?oldid=1370677477 under CC BY-SA 4.0; modifications have been made.