Last active
September 22, 2015 14:16
-
-
Save benjaminblack/e88c782d71899b654da3 to your computer and use it in GitHub Desktop.
Recursively copy a remote directory with 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
rsync --checksum --human-readable --archive --verbose --compress --partial --progress --rsh=ssh <host>:<remote-path> <local-path> | |
* Note: if <path> ends with /, the specified directory is not included in the copy, just its contents (recursively). I.e., to copy a remote "folder" to a local "folder", without copying the folder itself, include a trailing "/" in the remote path. | |
Options: | |
--checksum: skip based on checksum, not mod-time & size | |
--human-readable: output numbers in a human-readable format | |
--archive: archive mode; same as -rlptgoD (no -H) | |
-r, --recursive: recurse into directories | |
-l, --links: copy symlinks as symlinks | |
-p, --perms: preserve permissions | |
-t, --times: preserve modification times | |
-g, --group: preserve group | |
-o, --owner: preserve owner (super-user only) | |
-D: same as --devices --specials | |
--devices: preserve device files (super-user only) | |
--specials: preserve special files | |
--verbose: increase verbosity | |
--compress: compress file data during the transfer | |
--partial: keep partially transferred files | |
--progress: show progress during transfer | |
--rsh=COMMAND: specify the remote shell to use | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment