add new osx system app to exclude

master
Jeffrey Paul 5 years ago
parent 8b7e3121de
commit 5e59db5d72
  1. 75
      osxbackup/rsyncbackup.command

@ -1,4 +1,5 @@
#!/bin/bash
# 345678901234567892123456789312345678941234567895123456789612345678971234567898
# mac homedir backup script.
# by jeffrey paul <sneak@datavibe.net>
@ -9,59 +10,68 @@ NOW="`date +%Y%m%d.%H%M%S`"
BACKUPDEST=${BACKUPDEST:-"/Volumes/ExternalBackup/sneak.backup"}
RSYNC_SKIP_COMPRESS="3fr/3g2/3gp/3gpp/7z/aac/ace/amr/apk/appx/appxbundle/arc/arj/arw"
RSYNC_SKIP_COMPRESS="3fr/3g2/3gp/3gpp/7z/aac/ace/amr/apk/appx/appxbundle"
RSYNC_SKIP_COMPRESS+="/arc/arj/arw"
RSYNC_SKIP_COMPRESS+="/asf/avi/bz2/cab/cr2/crypt[5678]/dat/dcr/deb/dmg/drc/ear"
RSYNC_SKIP_COMPRESS+="/erf/flac/flv/gif/gpg/gz/iiq/iso/jar/jp2/jpeg/jpg/k25/kdc"
RSYNC_SKIP_COMPRESS+="/lz/lzma/lzo/m4[apv]/mef/mkv/mos/mov/mp[34]/mpeg/mp[gv]/msi"
RSYNC_SKIP_COMPRESS+="/lz/lzma/lzo/m4[apv]/mef/mkv/mos/mov/mp[34]/mpeg"
RSYNC_SKIP_COMPRESS+="/mp[gv]/msi"
RSYNC_SKIP_COMPRESS+="/nef/oga/ogg/ogv/opus/orf/pef/png/qt/rar/rpm/rw2/rzip/s7z"
RSYNC_SKIP_COMPRESS+="/sfx/sr2/srf/svgz/t[gb]z/tlz/txz/vob/wim/wma/wmv/xz/zip"
RSYNC="$HOME/Library/Homebrew/bin/rsync"
RSYNC="rsync"
RSYNC_TRY="$HOME/Library/Homebrew/bin/rsync"
if [[ -e "$RSYNC_TRY" ]]; then
RSYNC="$RSYNC_TRY"
fi
#OPTS="-rlptDPSyzh --numeric-ids --no-owner --no-group --delete-excluded --delete"
OPTS=""
OPTS+=" -avP --skip-compress=$RSYNC_SKIP_COMPRESS"
OPTS+=" --numeric-ids --no-owner --no-group --delete-excluded --delete-after"
RE=""
RE+=" --exclude=/.minikube/cache/"
RE+=" --exclude=/.docker/"
RE+=" --exclude=.cache/"
RE+=" --exclude=.bundle/"
RE+=" --exclude=.cache/"
RE+=" --exclude=/.cpan/build/"
RE+=" --exclude=/.cpan/sources/"
RE+=" --exclude=/.docker/"
RE+=" --exclude=/.dropbox/"
RE+=" --exclude=/.minikube/cache/"
RE+=" --exclude=/Desktop/" # desktop is like a visible tempdir.
RE+=" --exclude=/Library/Safari/"
RE+=" --exclude=/Documents/Dropbox/.dropbox.cache/"
RE+=" --exclude=/Documents/Steam?Content/"
RE+=" --exclude=/Downloads/"
RE+=" --exclude=/Library/Application?Support/Ableton/"
# evernote syncs to its server:
RE+=" --exclude=/Library/Application?Support/Evernote/"
RE+=" --exclude=/Library/Application?Support/Adobe/Adobe?Device?Central?CS4/"
RE+=" --exclude=/Library/Application?Support/CrossOver?Games/"
RE+=" --exclude=/Library/Application?Support/Evernote/" # syncs to cloud
RE+=" --exclude=/Library/Application?Support/InsomniaX/"
RE+=" --exclude=/Music/iTunes/Album?Artwork/"
RE+=" --exclude=/Documents/Steam?Content/"
RE+=" --exclude=/.dropbox/"
RE+=" --exclude=/Documents/Dropbox/.dropbox.cache/"
RE+=" --exclude=/.cpan/build/"
RE+=" --exclude=/.cpan/sources/"
RE+=" --exclude=/Library/Logs/"
# keep your mail on the server!
RE+=" --exclude=/Library/Mail/"
RE+=" --exclude=/Library/Mail?Downloads/"
RE+=" --exclude=/Library/Application?Support/MobileSync/"
RE+=" --exclude=/Library/Application?Support/SecondLife/cache/"
RE+=" --exclude=/Library/Caches/"
RE+=" --exclude=/Library/Developer/Xcode/DerivedData/"
RE+=" --exclude=/Library/Developer/Shared/Documentation/"
RE+=" --exclude=/Library/iTunes/iPhone?Software?Updates/"
RE+=" --exclude=/Library/iTunes/iPad?Software?Updates/"
RE+=" --exclude=/Pictures/iPod?Photo?Cache/"
RE+=" --exclude=/Library/Application?Support/Steam/SteamApps/"
RE+=" --exclude=/Library/Application?Support/SyncServices/"
RE+=" --exclude=/Library/Application?Support/MobileSync/"
RE+=" --exclude=/Library/Application?Support/Adobe/Adobe?Device?Central?CS4/"
RE+=" --exclude=/Library/Safari/HistoryIndex.sk"
RE+=" --exclude=/Library/Application?Support/CrossOver?Games/"
RE+=" --exclude=/Library/Preferences/Macromedia/Flash?Player/"
RE+=" --exclude=/Library/PubSub/"
RE+=" --exclude=/Library/Caches/"
RE+=" --exclude=/Library/Containers/com.docker.docker/"
RE+=" --exclude=/Library/Cookies/"
RE+=" --exclude=/Library/Developer/"
RE+=" --exclude=/Library/Homebrew/"
RE+=" --exclude=/Library/Logs/"
RE+=" --exclude=/Library/Mail/" # keep your mail on the server!
RE+=" --exclude=/Library/Mail?Downloads/"
RE+=" --exclude=/Library/Preferences/Macromedia/Flash?Player/"
RE+=" --exclude=/Library/Preferences/SDMHelpData/"
RE+=" --exclude=/Library/PubSub/"
RE+=" --exclude=/Library/Safari/"
RE+=" --exclude=/Library/Safari/HistoryIndex.sk"
RE+=" --exclude=/Library/iTunes/iPad?Software?Updates/"
RE+=" --exclude=/Library/iTunes/iPhone?Software?Updates/"
RE+=" --exclude=/Music/iTunes/Album?Artwork/"
RE+=" --exclude=/Pictures/iPod?Photo?Cache/"
RE+=" --exclude=/Receivd/"
RE+=" --exclude=/Library/Application?Support/Steam/SteamApps/"
RE+=" --exclude=/VirtualBox?VMs/"
# apps in homedir
@ -126,6 +136,7 @@ RE+=" --exclude=/Safari.app"
RE+=" --exclude=/Siri.app"
RE+=" --exclude=/Spotify.app"
RE+=" --exclude=/Steam.app"
RE+=" --exclude=/Stocks.app"
RE+=" --exclude=/Stickies.app"
RE+=" --exclude=/System?Preferences.app"
RE+=" --exclude=/TextEdit.app"

Loading…
Cancel
Save