annotate do-backup @ 2:30145875d811

Update when we pull website code down
author IBBoard <dev@ibboard.co.uk>
date Sun, 09 Nov 2014 09:27:00 +0000
parents e85e3470a41e
children 29dc6ad8d8ac
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
e85e3470a41e Initial commit of useful scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
1 #! /bin/sh
e85e3470a41e Initial commit of useful scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
2
e85e3470a41e Initial commit of useful scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
3 if [ $# -ne 1 ]; then
e85e3470a41e Initial commit of useful scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
4 echo "Usage: $0 <dest>" >&2
e85e3470a41e Initial commit of useful scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
5 exit 1
e85e3470a41e Initial commit of useful scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
6 elif [ ! -d "$1" ]; then
e85e3470a41e Initial commit of useful scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
7 echo "Destination $1 did not exist/was not a directory" >&2
e85e3470a41e Initial commit of useful scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
8 exit 1
e85e3470a41e Initial commit of useful scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
9 fi
e85e3470a41e Initial commit of useful scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
10
e85e3470a41e Initial commit of useful scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
11 DISK="$1"
e85e3470a41e Initial commit of useful scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
12 RSYNC_ARGS=${RSYNC_ARGS:-}
e85e3470a41e Initial commit of useful scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
13 rsync -av $RSYNC_ARGS --exclude=.thumbnails --exclude=temp --exclude=banshee.db --exclude=.cache --exclude=.local/share/Trash --exclude=.SpiderOak --exclude Documents/Games\ Workshop/LivingRuleBooks /home/ibboard "$DISK"/
e85e3470a41e Initial commit of useful scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
14 rsync -av $RSYNC_ARGS --exclude=Videos/Other --include=Downloads/games --include=Downloads/M4Ps --exclude=Downloads/* --exclude=.Trash-1000 --exclude=.Trash-1001 --exclude=Pictures/Photos/Temp --exclude=VirtualBox/VBoxGuestAdditions* /mnt/media "$DISK"/
e85e3470a41e Initial commit of useful scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
15 rsync -av $RSYNC_ARGS /usr/local/bin "$DISK"/
e85e3470a41e Initial commit of useful scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
16