diff --git a/homedir.makefile/Makefile b/homedir.makefile/Makefile index 4f719e2..7809012 100644 --- a/homedir.makefile/Makefile +++ b/homedir.makefile/Makefile @@ -1,11 +1,12 @@ JUNKFILES = .bash_history .irb_history .pip .ScanSnap .nbems .fldigi .cpan JUNKFILES += .gdb_history .mysql_history .sqlite_history +YYYYMM := $(shell date +%Y%m) default: backup backup: clean - @mbsync -X eeqjgmail - @mbsync -X acidhousegmail + mbsync eeqjgmail + mbsync acidhousegmail -rsync -avPhz --delete sneak@datavibe.net:.maildir/ \ $(HOME)/Documents/Secure/datavibe.maildir/ @internalbackup.command # to 1tb @@ -16,6 +17,8 @@ clean: -rm -rfv ~/Library/Caches/* -rm -rfv ~/.Trash/* -rm -rfv $(JUNKFILES) + -mkdir -p $(HOME)/Documents/$(YYYYMM) + -mv $(HOME)/Desktop/* $(HOME)/Documents/$(YYYYMM) size: du -sh $(HOME) diff --git a/osxbackup/backup.command b/osxbackup/backup.command index 1a4bd49..ab29e61 100755 --- a/osxbackup/backup.command +++ b/osxbackup/backup.command @@ -9,12 +9,10 @@ NOW="`date +%Y%m%d.%H%M%S`" BACKUPDEST=${BACKUPDEST:-"${USER}@jfk1.datavibe.net:backup/"} -RSYNC="/usr/bin/rsync" +RSYNC="rsync.3.0.9" OPTS="-rlptDPSyzh --no-owner --no-group --delete-excluded --delete" RE="" -# Dropbox syncs itself just fine: -RE+=" --exclude=/Documents/Dropbox/" RE+=" --exclude=/Desktop/" # desktop is like a visible tempdir. RE+=" --exclude=/Library/Safari/" RE+=" --exclude=/Downloads/" @@ -25,6 +23,7 @@ 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/" @@ -34,6 +33,7 @@ RE+=" --exclude=/Library/Mail?Downloads/" 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/" @@ -74,20 +74,3 @@ while [ $RETVAL -ne 0 ]; do RETVAL=$? sleep 1; done - -if [ "${BACKUPDEST::16}" = "/Volumes/imac1tb" ]; then - echo "no need to backup to same disk" - exit 0 -fi - -BASE="/Volumes/imac1tb/sneak.data" -for DIR in Movies Pictures ; do - if [ -d "${BASE}/${DIR}/" ]; then - RETVAL=255 - while [ $RETVAL -ne 0 ]; do - $RSYNC $OPTS "${BASE}/${DIR}/" "${BACKUPDEST}/${DIR}/" - RETVAL=$? - sleep 1; - done - fi -done