Cartika Support Portal

            Rsync over SSH


            How To Use Rsync via SSH OR how to use RSync with a Remote System:
            Syncing to a remote system is trivial if you have SSH access to the remote machine and rsync installed on both sides.

            Once you have SSH access verified on between the two machines, you can sync the dir1 folder from earlier to a remote computer by using this syntax (note that we want to transfer the actual directory in this case, so we omit the trailing slash):

            rsync -a ~/dir1 username@remote_host:destination_directory
            This is called a "push" operation because it pushes a directory from the local system to a remote system.

            The opposite operation is "pull". It is used to sync a remote directory to the local system. If the dir1 were on the remote system instead of our local system, the syntax would be:

            rsync -a username@remote_host:/home/username/dir1 place_to_sync_on_local_machine
            Like "cp" and similar tools, the source is always the first argument, and the destination is always the second.

             
            Updated: 20 Jun 2018 04:59 PM
            Helpful?  
            Help us to make this article better
            0 0