User Tools

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 [2026/03/31 12:20] (current) – [What About Automatic Backups?] 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 42: Line 42:
   The source and destination cannot both be remote.   The source and destination cannot both be remote.
  
-So if you want to sync between two remote machines, you will have to first SSH into one of them and run ''rsync'' from there "locally" and with the other machine as the remote. If your files.+So if you want to sync between two remote machines, you will have to first SSH into one of them and run ''rsync'' from there "locally" with the other machine as the remote.
  
  
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.
  
  
Line 88: Line 93:
  
 ''rsync'' does not have a built-in scheduling service. The easiest way to set your rsync-powered backups on autopilot, is with the use of [[tools:cron|crontab]]. ''rsync'' does not have a built-in scheduling service. The easiest way to set your rsync-powered backups on autopilot, is with the use of [[tools:cron|crontab]].
 +
 +
 +===== Further Reading =====
 +
 +  * [[rfc>5781|RFC 5781]] - Official specification for the ''rsync:'' URI scheme used by rsync.
 +
  
    
 {{tag>Tools}} {{tag>Tools}}
tools/rsync.1760251803.txt.gz · Last modified: (external edit)

Find this page online at: https://bestpoint.institute/tools/rsync
CC Attribution-Noncommercial-Share Alike 4.0 International The Anonymous Fruit Company The East Internet Trading Company Erischan Novelty Lanterns

Copyright 2026 Best Point Holdings Limited