#! /usr/bin/env bash VERSION=1.0.0 USBLOG=/root/usbbackup.log MAILTO=backups@dailydata.net if /etc/rsbackup/scripts/mountDrive /media/backup then rm $USBLOG.gz rsync --verbose --exclude-from=/etc/rsync.exclude --owner --group --checksum --recursive --delete --delete-excluded --stats /home /etc /root /media/backup/ 1>$USBLOG 2>&1 gzip $USBLOG mpack -a -s "Backup Report `date`" $USBLOG.gz $MAILTO umount /media/backup fi