#!/bin/sh

# see http://blog.interlinked.org/tutorials/rsync_time_machine.html
# CHANGE YOUR BACKDIR AND HOME VARIABLES AS YOU SEE FIT!

date=`date "+%Y-%m-%dT%H:%M:%S"`
backdir='/media/USBdrive/Backups/'
home=/home/username
rsync -aP --exclude-from=$home/.rsync/exclude --link-dest=$backdir/current $home $backdir/back-$date && rm -f $backdir/current && ln -s back-$date $backdir/current

