So I understand that rsync works by using a checksum algorithm that updates files according to file size and date. But isn't this synchronization dependent on how source and destination are called? Doesn't the order of source to destination change the behavior of what gets synced?
Let me get to where I am going..
rsync -e ssh -varz ~/local/directory/ email@example.com:~/remoteFolder/
is not the same as
rsync -e ssh -varz firstname.lastname@example.org:~/remoteFolder/ ~/local/directory/
But I thought that either way you called rsync, the whole point of it was so that any file that is newer is updated between the local and remote destinations.
However, it seems that it's dependent on whether your new file is located under the source rather than the destination location. If I updated file1 on my local machine (same, but older file1 on server), saved it, and then used
code2 to sync between locations, I noticed that the new version of file1 on my local machine does not upload to the server. It actually overwrote the updated file with the older version. If I use
input2 it does upload modified to server.
Is there a way to run rsync in which it literally synchronizes new and modified files no matter whether source or destination locations are called first according to newer/modified file location?