Skip to content

Instantly share code, notes, and snippets.

@christopher-baek
Last active April 3, 2016 21:38
Show Gist options
  • Select an option

  • Save christopher-baek/845c7ff1ecb125c27898 to your computer and use it in GitHub Desktop.

Select an option

Save christopher-baek/845c7ff1ecb125c27898 to your computer and use it in GitHub Desktop.
rsync Archive With FAT Device

rsync Archive With FAT Device

rsync Man Page:

-a, --archive               archive mode; same as -rlptgoD (no -H)
-r, --recursive             recurse into directories
-l, --links                 copy symlinks as symlinks
-p, --perms                 preserve permissions
-t, --times                 preserve times
-g, --group                 preserve group
-o, --owner                 preserve owner (super-user only)
-D                          same as --devices --specials

Unnecessary

  • Since FAT doesn't have links, -l won't have any effect
  • Since FAT doesn't have permissions or ownership, -p, -g, and -o won't have any effect
  • Since FAT doesn't have modification times, -t won't have any effect
  • Since FAT doesn't have specials devices, -D won't have any effect

Absolutely Necessary

--modify-window=NUM     compare mod-times with reduced accuracy
  • --modify-window necessary because of nuances with FAT timestamps; all files will probably be transfered without this option

Optional

-c, --checksum              skip based on checksum, not mod-time & size
  • the default algorithm of using mod-time and size to check whether a file needs to be transfered will be replaced by a checksum algorithm

Nice To Have

--delete                    delete extraneous files from dest dirs
--stats                     give some file-transfer stats
--progress                  show progress during transfer
-i, --itemize-changes       output a change-summary for all updates
rsync -avc --modify-window 1 --delete --stats --progress --itemize-changes ${SOURCE}/ ${DESTINATION}
rsync -rtvD --modify-window 1 --delete --stats --progress ${SOURCE}/ ${DESTINATION}/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment