Difference between revisions of "Rsync"
Jump to navigation
Jump to search
(Created page with "To synchronize two directories on two or more computers, rsync can be a useful solution. This is a reference<ref>https://www.digitalocean.com/community/tutorials/how-to-use-rs...") |
|||
(5 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
This is a reference<ref>https://www.digitalocean.com/community/tutorials/how-to-use-rsync-to-sync-local-and-remote-directories</ref>: | This is a reference<ref>https://www.digitalocean.com/community/tutorials/how-to-use-rsync-to-sync-local-and-remote-directories</ref>: | ||
rsync -a username@remote_host:/home/username/dir1 place_to_sync_on_local_machine | rsync -a username@remote_host:/home/username/dir1 place_to_sync_on_local_machine | ||
==Running rsync in the background== | |||
An article showing how to run rsync in the background can be found here:<ref>https://nixcp.com/rsync-process-in-background/</ref>. The instruction to run it in the background can be found here: | |||
nohup rsync -a host.origin:/path/data destiny.host:/path/ & | |||
==Run rsync with ssh== | |||
To supply an ssh-key file to rsync, one can use the following command: | |||
rsync -avzhe "ssh -i ~/.ssh/KEYFILE_NAME.pem" <user>@<remote-machine_DNS>:<remote folder> <local folder> --progress | |||
=References= | |||
<references/> | |||
==Related Pages== | |||
*[[Tools::ssh]] |
Latest revision as of 07:56, 20 August 2021
To synchronize two directories on two or more computers, rsync can be a useful solution. This is a reference[1]:
rsync -a username@remote_host:/home/username/dir1 place_to_sync_on_local_machine
Running rsync in the background
An article showing how to run rsync in the background can be found here:[2]. The instruction to run it in the background can be found here:
nohup rsync -a host.origin:/path/data destiny.host:/path/ &
Run rsync with ssh
To supply an ssh-key file to rsync, one can use the following command:
rsync -avzhe "ssh -i ~/.ssh/KEYFILE_NAME.pem" <user>@<remote-machine_DNS>:<remote folder> <local folder> --progress