Skip to content

Instantly share code, notes, and snippets.

@stefancrain
Created July 14, 2016 18:51
Show Gist options
  • Save stefancrain/3b19d06f4085810080c890cc22d3fd72 to your computer and use it in GitHub Desktop.
Save stefancrain/3b19d06f4085810080c890cc22d3fd72 to your computer and use it in GitHub Desktop.
skip some file types that don't compress very well
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/cr2/nef/iiq/3fr/dcr/k25/kdc/erf/mef/mos/orf/pef/rw2/arw/srf/sr2
rsync -avzchP --compress-level=9 --skip-compress=$RSYNC_SKIP_COMPRESS /from/disk /to/disk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment