Created
March 27, 2010 04:17
-
-
Save paulbaumgart/345714 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size=`rsync --delete --delete-excluded -pthrv --exclude-from \ | |
/Users/paul/.backup/exclude /Users/paul/Documents/ \ | |
/Users/paul/Dropbox | egrep -o "total size is (.*)G" | egrep -o "[0-9\.]+"` | |
if [ "$size" = "" ]; then | |
size=0 | |
fi | |
if [ `echo "$size < 1.8" | bc` = 0 ]; then | |
echo "`date`: WARNING: Size is running out for Dropbox backups.\ | |
(Currently using ${size} GB.)" 1>&2 | |
elif [ "$1" != "" ]; then | |
echo "size: $size GB" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment