updates
This commit is contained in:
parent
47a0f41e2e
commit
43ab9629f2
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user