X-Git-Url: https://piware.de/gitweb/?p=bin.git;a=blobdiff_plain;f=backup;h=c89693b25ad25dc7710c8ed943c144302e3b1504;hp=314fd74d884905e6e2b27682fee3c518d871e7b0;hb=d459650e604de4c2875257cd76f97d3e0c32e0e0;hpb=8fcb5b8bef8614cf1b111470bc2ae229746c86fd diff --git a/backup b/backup index 314fd74..c89693b 100755 --- a/backup +++ b/backup @@ -2,6 +2,7 @@ set -eu cd $HOME LOG=.cache/duplicity/log +PATH=$PATH:/sbin:/usr/sbin # do backup every day if [ -e "$LOG" ] && [ $(( `date +%s` - `stat -c %Y $LOG` )) -lt 86300 ]; then @@ -26,6 +27,6 @@ fi notify-send "Backup started" mkdir -p $(dirname $LOG) -env PASSPHRASE="$(cat ~/.backup-passphrase)" duplicity --allow-source-mismatch --full-if-older-than 1M --exclude-filelist .duplicity-ignore . rsync://piware.de/backup/donald >> $LOG || { notify-send "BACKUP FAILED!"; exit 1; } +env PASSPHRASE="$(cat ~/.backup-passphrase)" duplicity --allow-source-mismatch --full-if-older-than 1M --exclude-filelist .duplicity-ignore . rsync://piware.de/backup/laptop >> $LOG || { notify-send "BACKUP FAILED!"; exit 1; } notify-send "Backup finished successfully" -duplicity remove-all-but-n-full 6 --force rsync://piware.de/backup/donald +duplicity remove-all-but-n-full 6 --force rsync://piware.de/backup/laptop