muttrc disable encryption when sending from ru
[dotfiles.git] / shell / .local / bin / backup.sh
index d3a8c23..cd4ebe5 100755 (executable)
@@ -8,7 +8,7 @@ um ()
 start="$(date)"
 if [ ! -n "$1" ]
 then
-       echo "Was this script called from udev? I need the ID_FS_UUID_ENC variable" | tee /home/mrl/backup.log
+       echo "Was this script called from udev? I need the UUID as the first argument" > /home/mrl/backup.log
        exit 1
 elif mountpoint -q /mnt/backupdrive
 then
@@ -22,7 +22,7 @@ elif mount -U "$1"
 then
        mkdir -p /mnt/backupdrive/home/mrl /mnt/backupdrive/mnt/data &&\
        rsync --delete --bwlimit=20M --exclude 'minidlna/*' --exclude 'transmission/ipt/*' -va /mnt/data/ /mnt/backupdrive/mnt/data > /home/mrl/backup.log &&\
-       rsync --delete --bwlimit=20M -va /home/mrl/ /mnt/backupdrive/home/mrl >> /home/mrl/backup.log &&\
+       rsync --delete --bwlimit=20M --exclude 'VirtualBox VMs' -va /home/mrl/ /mnt/backupdrive/home/mrl >> /home/mrl/backup.log &&\
        umount /mnt/backupdrive &&\
        cat<<MAIL | su -c 'ssh helheim /usr/lib/sendmail backups@martlubbers.net' mrl
 To: mart@martlubbers.net