updated backup tools

This commit is contained in:
Jeffrey Paul 2013-12-29 03:17:42 +01:00
parent 50a07c144e
commit 937ac1d09f
3 changed files with 70 additions and 9 deletions

57
osxbackup/appbackup.command Executable file
View File

@ -0,0 +1,57 @@
#!/bin/bash
EX=""
EX+=" --exclude=.DS_Store"
EX+=" --exclude=/iBooks.app/"
EX+=" --exclude=/iTunes.app/"
EX+=" --exclude=/FaceTime.app/"
EX+=" --exclude=/Calendar.app/"
EX+=" --exclude=/Mail.app/"
EX+=" --exclude=/QuickTime?Player.app/"
EX+=" --exclude=/Safari.app/"
EX+=" --exclude=/Preview.app/"
EX+=" --exclude=/Notes.app/"
EX+=" --exclude=/TextEdit.app/"
EX+=" --exclude=/Photo?Booth.app/"
EX+=" --exclude=/Game?Center.app/"
EX+=" --exclude=/Calculator.app/"
EX+=" --exclude=/Chess.app/"
EX+=" --exclude=/Dictionary.app/"
EX+=" --exclude=/Image?Capture.app/"
EX+=" --exclude=/System?Preferences.app/"
EX+=" --exclude=/DVD?Player.app/"
EX+=" --exclude=/Stickies.app/"
EX+=" --exclude=/Time?Machine.app/"
EX+=" --exclude=/Mission?Control.app/"
EX+=" --exclude=/Dashboard.app/"
EX+=" --exclude=/Launchpad.app/"
EX+=" --exclude=/Contacts.app/"
EX+=" --exclude=/Maps.app/"
EX+=" --exclude=/App?Store.app/"
EX+=" --exclude=/Reminders.app/"
EX+=" --exclude=/Automator.app/"
EX+=" --exclude=/Font?Book.app/"
EX+=" --exclude=/Messages.app/"
EX+=" --exclude=/Utilities/Activity?Monitor.app/"
EX+=" --exclude=/Utilities/AirPort?Utility.app/"
EX+=" --exclude=/Utilities/AppleScript?Editor.app/"
EX+=" --exclude=/Utilities/Audio?MIDI?Setup.app/"
EX+=" --exclude=/Utilities/Bluetooth?File?Exchange.app/"
EX+=" --exclude=/Utilities/Boot?Camp?Assistant.app/"
EX+=" --exclude=/Utilities/ColorSync?Utility.app/"
EX+=" --exclude=/Utilities/Console.app/"
EX+=" --exclude=/Utilities/DigitalColor?Meter.app/"
EX+=" --exclude=/Utilities/Disk?Utility.app/"
EX+=" --exclude=/Utilities/Grab.app/"
EX+=" --exclude=/Utilities/Grapher.app/"
EX+=" --exclude=/Utilities/Keychain?Access.app/"
EX+=" --exclude=/Utilities/Migration?Assistant.app/"
EX+=" --exclude=/Utilities/System?Information.app/"
EX+=" --exclude=/Utilities/Terminal.app/"
EX+=" --exclude=/Utilities/VoiceOver?Utility.app/"
EX+=" --exclude=/VirtualBox.app/" #useless without kexts
DEST="sneak@ber1.local:backup/Applications.20131229"
rsync -avP --delete --delete-excluded $EX \
/Applications/ $DEST/

View File

@ -7,20 +7,24 @@
NOW="`date +%Y%m%d.%H%M%S`"
#RBACKUPDEST=${RBACKUPDEST:-"file:///Volumes/TImeMachine/sneakbackup/"}
#RBACKUPDEST=${RBACKUPDEST:-"sftp://sneak@datavibe.net/backup"}
RBACKUPDEST=${RBACKUPDEST:-"file:///Volumes/EXTUSB01/dup/"}
#RBACKUPDEST=${RBACKUPDEST:-"file:///Volumes/EXTUSB02/dup/"}
BACKUPDEST=${BACKUPDEST:-"sftp://sneak@datavibe.net/backup"}
PASSPHRASEFILE="${HOME}/Documents/Secure/backup-password.txt"
export PASSPHRASE="$(cat $PASSPHRASEFILE)"
#OPTS="--encrypt-sign-key 1921C0F4"
OPTS+=" -v 5"
OPTS+=" --exclude-globbing-filelist ${HOME}/.local/etc/duplicity.exclude"
OPTS+=" --volsize 1024"
OPTS+=" --volsize 100"
OPTS+=" --asynchronous-upload"
OPTS+=" --allow-source-mismatch"
GPGOPTS="--compress-algo=bzip2 --bzip2-compress-level=9"
if [ "$1" == "--verify" ]; then
duplicity verify $OPTS $RBACKUPDEST ${HOME}/
time \
duplicity --gpg-options '$GPGOPTS' \
verify $OPTS $BACKUPDEST ${HOME}/
else
duplicity $EXTRADUPLICITY $OPTS $RE ${HOME}/ $RBACKUPDEST
time \
duplicity --gpg-options "$GPGOPTS" \
$EXTRADUPLICITY $OPTS $RE ${HOME}/ $BACKUPDEST
fi

View File

@ -2,4 +2,4 @@
HOSTNAME="`hostname -s`"
export RBACKUPDEST="s3+http://${HOSTNAME}.duplicitybackup"
backup.command
source backup.command