I recently needed to use rsync to only copy over files that did not already exist at the other end, so this post documents how to do this.Note that all the examples shown in the post are for copying files from the local computer to a remote server/computer.
Rsync only copies parts of the source file that have changed.
Even though the TAR file may be very large, if only one small file is changed within that file, that's all the rsync transfers, and the backup process will take almost zero time.
As a system administrator or Linux power user, you may have probably come across or even on several occasions, used the versatile Linux Rsync tool, which enables users to expeditiously copy or synchronize files locally and remotely.
It is as well a great tool popularly used for backup operations and mirroring.
I run this every night (but with remote and local swapped) to run an offsite backup, and all it transfers is the differences from a 20-odd gig backup directory.
Rsync is a useful command line utility for synchronising files and directories across two different file systems.By adding this, we eliminate behaviors 2 and 3 in the list above and all that is done is this: In the case I was talking about, we didn't want to overwrite any files at the other end.However you may want to copy files over the have been updated more recently on the local filesystem which is done with the --update flag.This tells rsync to skip updating files that already exist on the destination (this does not ignore existing directories, or nothing would get done). This option is a transfer rule, not an exclude, so it doesn't affect the data that goes into the file-lists, and thus it doesn't affect deletions.It just limits the files that the receiver requests to be transferred. This option is normally used when you are copying to a remote rsync server over a slow network.