User Tools

(aka 'the best point military institute')

Site Tools

tools:rsync

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tools:rsync [2025/10/12 06:50] – [Remote & Network Backups] Humphrey Boa-Garttools:rsync [2025/10/12 07:40] (current) – [rsync] Humphrey Boa-Gart
Line 3: Line 3:
 **rsync** //(or **remote sync**)// is a [[tools:bash|command line]] utility for transferring and synchronizing files between any given //"source"// and //"destination"// pair. It is extremely popular for use in backup utilities, at it can synchronize backups between not only local filesystems, but also over the internet via [[tools:ssh|SSH]]. **rsync** //(or **remote sync**)// is a [[tools:bash|command line]] utility for transferring and synchronizing files between any given //"source"// and //"destination"// pair. It is extremely popular for use in backup utilities, at it can synchronize backups between not only local filesystems, but also over the internet via [[tools:ssh|SSH]].
  
-While you can technically use the ''cp -R'' command to make quick and dirty backups, ''rsync'' offers far more flexibility for common real-world scenarios.+While you can technically use the ''cp -R'' command to make quick and dirty backups, ''rsync'' offers far more flexibility for many common real-world scenarios.
  
 If you are already familiar with using [[tools:wget|Wget]] to make mirrors of entire websites, then use of ''rsync'' should come to you pretty naturally - it just operates over local filesystems & SSH instead of HTTP/HTTPS/FTP. If you are already familiar with using [[tools:wget|Wget]] to make mirrors of entire websites, then use of ''rsync'' should come to you pretty naturally - it just operates over local filesystems & SSH instead of HTTP/HTTPS/FTP.
Line 73: Line 73:
  
   $ rsync -av --exclude-from 'exclusions.txt' /path/to/source/dir/ /path/to/destination/dir/   $ rsync -av --exclude-from 'exclusions.txt' /path/to/source/dir/ /path/to/destination/dir/
 +
 +You can even exclude things like specific filetypes:
 +
 +  $ rsync -av --exclude='*.ext' /path/to/source/dir/ /path/to/destination/dir/
  
  
Line 82: Line 86:
   * Use ''--progress'' to see real-time transfer status.   * Use ''--progress'' to see real-time transfer status.
   * Use ''--log-file=transfer.log'' to generate a log file of the transfer.   * Use ''--log-file=transfer.log'' to generate a log file of the transfer.
 +  * Use ''--remove-source-files'' to delete the source directory once the transfer is complete.
  
  
tools/rsync.1760251835.txt.gz · Last modified: by Humphrey Boa-Gart

Find this page online at: https://bestpoint.institute/tools/rsync