The person asked:
Quote:
|
does it mean rsync will just check and copy the newer folders and files from the last copy?
|
All he wants it to do is copy the newer files from the last. Using just "-avz" will resync everything. There is no checking. You need "-u" to copy JUST newer files. That is: files which have a newer modification time on the source server, files which exist on the source but not the target, any differences between source and target servers.
This is exactly what the poster asked for.
From CLI:
[root@backup network-scripts]# rsync --help | grep "\-u"
-u, --update update only (don't overwrite newer files)
From "man rsync":
-u, --update
This forces rsync to skip any files for which the destination file already exists and has a date later than the
source file.
In the currently implementation, a difference of file format is always considered to be important enough for an
update, no matter what date is on the objects. In other words, if the source has a directory or a symlink where
the destination has a file, the transfer would occur regardless of the timestamps. This might change in the future
(feel free to comment on this on the mailing list if you have an opinion).