Rsync doesn’t skip existing files

backuprsync

I use rsync to backup all the files from a specific folder in a USB drive connected to my Mac (Osx 10.9) to a folder of my home network NAS.
The problem is that rsync replace all files and it does not skip existing files. Where I'm wrong? I use rsync 3.0.9.

rsync -avzh --delete --progress --filter='-p .DS_Store' /Volumes/USBDrive/Foto/* /Volumes/Nas/Foto

Best Answer

If want to skip files that exist without updating them, even if there are changes to those files, then use the --ignore-existing flag in your rsync command.

rsync --ignore-existing -avzh --delete --progress --filter='-p .DS_Store' /Volumes/USBDrive/Foto/* /Volumes/Nas/Foto

see https://explainshell.com

Related Question