Skip to content

Instantly share code, notes, and snippets.

@niun
Last active June 29, 2018 16:15
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save niun/be8e572039d9a8c6644e to your computer and use it in GitHub Desktop.
Save niun/be8e572039d9a8c6644e to your computer and use it in GitHub Desktop.
rsync backup cheatsheet
rsync -raXi --size-only /path/to/folder-to-backup/ /destinations/path/to/folder-to-backup
same as
rsync -rlptgoDXi --size-only /path/to/folder-to-backup/ /destinations/path/to/folder-to-backup
same as
rsync -rlptgoDXi --size-only /path/to/folder-to-backup /destinations/path/to
-r recursive
-l preserve links
-p preserve permissions (also updates permission on not transferred files)
-t preserve time (also updates time on not transferred files)
-g preserve group
-o preserve owner
-D preserve device and special files
-X preserve xattrs
--size-only don't use time to decide if file needs update
-i, --itemize-changes output a change-summary for all updates
-u don't update files that are newer on the receiver
-n just simulate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment