Last active
November 15, 2017 19:00
-
-
Save bpb54321/7beced04bd93e7239deff60b0c2148a5 to your computer and use it in GitHub Desktop.
Basic Rsync
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| You will need to place your public SSH key on the server for authentication for this to work. | |
| See this article: https://www.digitalocean.com/community/tutorials/how-to-copy-files-with-rsync-over-ssh | |
| rsync -rv -e 'ssh -p 1111' user@SOURCE:/path/ /Users/brianblosser/DESTINATION/ | |
| Use rsync to transfer files from an FTP source to a local destination | |
| -r: recurse into directories | |
| -v: verbose | |
| -e: Defines what protocol to connect with. | |
| 'ssh -p 1111' The argument of -e flag. Connect with ssh protocol on port 1111. | |
| The -p flag is typically not required unless you are using a special port. | |
| user@SOURCE | |
| user: user name | |
| SOURCE: server name | |
| :/path/ Path on the server. Specifying a directory will transfer all the files in a directory, but not the directory itself | |
| /DESTINATION/ Where to copy the files to. Will create a new directory if one with the name DESTINATION does not yet exist. | |
| rsync man page: https://download.samba.org/pub/rsync/rsync.html | |
| Computer Hope Reference: https://www.computerhope.com/unix/rsync.htm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment