Linux – Rsync only updated files

linuxrsync

I did an rsync from remote to local. Now I want to update the changed or newer files. How can I achieve it with rsync?

rsync -avz --progress -u -e ssh ServerName:FolderPath/FolderName LocalFolderName

It keeps downloading all files.

Best Answer

Look at the switch --update. From man rsync:

-u, --update                skip files that are newer on the receiver

EDIT: -a implies -rlptgoD, I didn't take that into account. As I said in the comments: give us the command output. That will show if the files are actually transferred or just checked for changes and then ignored.

Related Question