Automysqlbackup and Ubuntu 10.04

One thing that I haven’t been able to get working right in Ubuntu 10.04 was the automysqlbackup script. Basically I have this script set to run every day and it backs up the mysql databases on my server. After I made the upgrade, the script would run, create the backup files, but it would not email them to me. I have been casually looking for a fix over the last couple of months, but hadn’t found anything.

Well today I checked out the project page and a new version had been released. I was hoping this would fix the problem. I reconfigured the new script and ran it, but got the following error:

Can’t stat [email protected]: No such file or directory
[email protected]: unable to attach file.

I figured that was better than before as I didn’t get any error messages with the old version. I decided to look in the support forum and found a post from someone with the same problem. Here is what they did to fix it and it worked for me too.

Since i already had mutt installed, googled for the problem, but didnt find any like this. Then i looked through the script and changed this:

from:

mutt -s "${ERRORNOTE} MySQL Backup Log and SQL Files for ${HOST} - ${DATE}" ${BACKUPFILES} ${MAILADDR} < ${LOGFILE} #send via mutt

to:

mutt -s "${ERRORNOTE} MySQL Backup Log and SQL Files for ${HOST} - ${DATE}" ${MAILADDR} ${BACKUPFILES} < ${LOGFILE} #send via mutt

so all i did was switched ${BACKUPFILES} with ${MAILADDR} .

It is working all right now.

2 comments

  1. thank you, i had the same problem and this fixed it for me.

    mind if i share this link on my site? i’m planning a server setup post and this helped me a lot in setting up the auto-backup script.

Leave a comment