The answer to the original question:
1) It only synchronizes files in one direction, depending on the pull or push mechanism. for the push and pull mechanism, see the manual page on the "man rsync" page.
therefore, for the rest of your question, do not assume that it works as if in a way.
2) The file is deleted only in the destination directory. For more information about this, use the rsync --help command, see the --delete option, which removes extraneous files from target servers and other options for deletion.
3) Invalid files will only be copied to the destination directory if you click files on a remote computer / directory /
example example for the push mechanism: -
rsync -avz /home/local_dir/abc.txt remoteuser@192.168.xx.xx :/home/remoteuser/
if a file with the name abc.txt is already present in the target directory, then it will be updated depending on the old version of abc.txt on the local side or not. And if abc.txt is not in the remote directory, a complete new file will be created called abc.txt with the contents of the local version of abc.txt
sample example for traction mechanism: -
rsync -avz remoteuser@192.168.xx.xx :/home/remoteuser/abc.txt /home/local_dir/
if a file with the name abc.txt is already present in the local directory, then it will be updated depending on the old version of abc.txt on the side or not. And if abc.txt is not in the local directory, a complete new file will be created called abc.txt with the contents of the local version of abc.txt
source share