Let say that I have 2 machines:
- local (centos)
- remote on IP: 123.123.123.123 ssh port 456 (ubuntu server)
and I want to synchronize my remote folder /home/wolfy/py
with my local folder /home/cavo/python
.
Can this be done with rsync
? Can you give me an example?
Try this:
Note that the trailing slashes on the paths are very important, they signal that you are syncing a directory to a directory. The
-e
switch helpsrsync
know it is going to be usingssh
transport, and while we are specifying the transport we also tell ssh what port it's going to have to use to talk to the remote site. Then the username and remote host ip are specified as part of the target.For those of us that like the verbose solution.
Remember you always have a man with you.