Advertisement
Guest User

Untitled

a guest
Feb 7th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. zenity --question --title="Backup" --text="Backup now?"
  4. if [ $? -ne 0 ]; then
  5. exit
  6. fi
  7.  
  8. function backup() {
  9. #rsync --info=progress2 -a --delete --exclude ".*/" ~ /media/Elements/backups/rsync
  10. }
  11. ERROR=$(backup 2>&1 >/dev/null)
  12. if [ $? -eq 0 ]; then
  13. notify-send "Backup complete" "Backup completed on $(date)."
  14. else
  15. notify-send "Backup failed" "$ERROR"
  16. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement