Created
January 29, 2013 10:16
-
-
Save fnl/4663244 to your computer and use it in GitHub Desktop.
backup/restore files to [a USB dongle] FAT32 drive on OSX/HFS using rsync. Updates and deletes changed files recursively starting in some root directory "dir". Note that the terminal slashes present in the paths are required for rsync to work correctly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# backup from HFS drive to FAT32 (NB: file owner and extended metadata are not synced): | |
time rsync --recursive --update --delete --links --hard-links --safe-links --perms --times --modify-window=1 --stats --exclude '.DS_Store' --exclude '._*' ~/dir/ /Volumes/FAT32 | |
# restore from FAT32 to HFS (NB: "--delete" removes files in "dir" not in "FAT32"): | |
time rsync --recursive --update --delete --links --hard-links --safe-links --perms --times --modify-window=1 --stats --exclude '.DS_Store' --exclude '.Spotlight-V100' --exclude '.fseventsd' --exclude '.Trashes' /Volumes/FAT32/ ~/dir |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Much appreciated. Syncing from a FAT32 thumb drive to an HFS volume is exactly what I want to do.