25
7
How do I use the rsync
command from a local Windows 7 machine to a remote Linux server?
What software is needed on the Windows 7 machine to use rsync
?
The remote Linux server is using Amazon's Linux AMI. The command rsync
is already enabled on the machine and I can edit any needed access to the machine.
This is for the purposes of setting up a web server on the remote machine and the editing on my local machine and keeping the files in sync.
I do not want two-way access between the machines, I am only going to be editing files on my local machine and keeping them updated on the remote machine.
UPDATE:
I installed cygwin on my Windows 7 machine and installed the rsync package. Can someone provide the steps to set up the connection from the Windows 7 machine to the Linux server remotely?
Say I want to have a folder called C:\www
on my Windows machine and keep it updating\var\www
on my remote machine, how do I do that? It's not a backup per se, it updates the files that I edit with my local computer.
Description of
-c
parameter from bash man: If the -c option is present, then commands are read from string. If there are arguments after the string, they are assigned to the positional parameters, starting with $0. – Lukasz Stelmach – 2015-07-03T07:41:59.843Great stuff, helped me out. For those that use non-default port,
– Jason Goal – 2020-02-06T14:22:46.743"rsync -avzh -e 'ssh -p portnumber' -P --stats --timeout=60 --exclude Downloads . 'my_remote_linux_computer@128.95.170.200:/media/my_remote_linux_computer/LaCie/My\ Documents'"
, credit to https://www.tecmint.com/sync-files-using-rsync-with-non-standard-ssh-port/.