#! /bin/bash
if zenity --question --text "Do you want me to backup your files?" = 0; then
#rsync -r --progress /home/barry /media/hda1/backups/barry_pc | tee >(zenity --progress --text="Backing up files ....") >/home/barry/backup_log.txt
rsync -r --exclude=.* --progress /home/barry /media/storage/backups/barry_pc | tee >(zenity --progress --pulsate --text="Backing up files ....") >/home/barry/backup_log.txt
killall zenity
#rsync -r --progress /home/barry/.evolution /media/hda1/backups/barry_pc/barry | tee >(zenity --progress --pulsate --text="Backing up files ....") >/home/barry/backup_log.txt
killall zenity
rsync -r --progress /home/barry/.mozilla /media/storage/backups/barry_pc/barry | tee >(zenity --progress --pulsate --text="Backing up files ....") >/home/barry/backup_log.txt
rsync -r --progress /home/barry/.thunderbird /media/storage/backups/barry_pc/barry/thunderbird | tee >(zenity --progress --pulsate --text="Backing up files ....") >/home/barry/backup_log.txt
#zenity --info --text="File backup in progress ...."
#rsync -r /home/barry /media/storage/backups/barry_pc
killall zenity
sleep 30 | tee >(zenity --info --text="Backup completed sucessfully")
fi

