Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- zenity --question --title="Backup" --text="Backup now?"
- if [ $? -ne 0 ]; then
- exit
- fi
- function backup() {
- #rsync --info=progress2 -a --delete --exclude ".*/" ~ /media/Elements/backups/rsync
- }
- ERROR=$(backup 2>&1 >/dev/null)
- if [ $? -eq 0 ]; then
- notify-send "Backup complete" "Backup completed on $(date)."
- else
- notify-send "Backup failed" "$ERROR"
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement