Automated SQL backup problem

I’m having issues with setting up an automated SQL backup.

I’m following the instructions from

My script is as follows with my private information removed

cd /home/username/backup/
mkdir mysql
suffix=$(date +%y%m%d)
mysqldump --opt -uusername -ppassword -h dbname > mysql/sitename_backup_.$suffix.sql
tar zcf archives/mysql_backup.$suffix.tar.gz mysql/*
mutt -a /home/username/backup/archives/mysql_backup.$suffix.tar.gz -s "MySQL Backup"
rm -r mysql/

I get no errors. Checking behind the scenes, I found both the sql backup being grabbed, and it being successfully zipped. The freezup happens on the mutt command. I tried running it independently and it yielded the same results. Those results being a whole page of white nothingness in the command prompt and a complete stall.

I tried letting it run, thinking it may need time to complete, but it is a full stall.

Any help?




mkdir -p ~/archives
cd ~/archives
suffix=$(date +%y%m%d)
echo “SQL Backup of “$dbname” attached” >> tmp.txt
mysqldump --opt -u $dbuser -p$dbpass -h $dbhost $dbname > SQL_"$dbname"$suffix.sql
tar zcf SQL_Backup
"$dbname"$suffix.tar.gz *.sql
mutt -s “SQL Backup of “$dbname”” -a SQL_Backup
"$dbname"_$suffix.tar.gz $email < tmp.txt
rm -rf {*.sql,tmp.txt}

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost

Thanks you tons. Thats working great for me