Created
June 19, 2013 20:04
-
-
Save phx/5817554 to your computer and use it in GitHub Desktop.
recursive rsync over ssh on non-standard port, with update, compression, progress bars, and more.
This file contains 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
#!/bin/bash | |
# -a -- recursive, preserving date/time/ownership (`man rsync`) | |
# -u -- update (only replace/add files that are newer or non-existent on the target) | |
# -v -- verbose output | |
# -z -- compression | |
# --progress -- show progress bar with current transfer status | |
# -e -- execute command | |
rsync -auvz --progress [local source directory] -e "ssh -p [port]" user@ip:/path/to/target/directory/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment