Thursday, May 10, 2018

If you are having to use rsync, and transferring a lot of data. I find -z (--compress) is a great bandwith and time saver.

But the caveat is compressing already compressed data. It does not make sense to (re)compress. Therefore '--skip-compress=' is to the rescue.

The rsync man pages say, the list needs to be seperated by forward slashes (/). I dont know why forward slashes, when pretty much every other script / program makes use of commas.

Here is a list I found and all you need to do is:

export 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

rsync -vaz --skip-compress=$RSYNC_SKIP_COMPRESS /source /target


No comments:

Post a Comment