Created
December 8, 2016 12:01
-
-
Save kronoc/40faf0681efe683c84718db2282fabb9 to your computer and use it in GitHub Desktop.
Faster SCP with rsync
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
RSYNC_SKIP_COMPRESS=3g2/3gp/3gpp/7z/aac/ace/amr/apk/appx/appxbundle/arc/arj/asf/avi/bz2/cab/crypt5/crypt7/crypt8/deb/dmg/drc/ear/gz/flac/flv/gpg/iso/jar/jp2/jpg/jpeg/lz/lzma/lzo/m4a/m4p/m4v/mkv/msi/mov/mp3/mp4/mpeg/mpg/mpv/oga/ogg/ogv/opus/png/qt/rar/rpm/rzip/s7z/sfx/svgz/tbz/tgz/tlz/txz/vob/wim/wma/wmv/xz/z/zip | |
IFS=";;;" rsync --partial --progress --skip-compress=${RSYNC_SKIP_COMPRESS} -avz -e "ssh -T -o 'Compression=no'" "$1" "$2" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment