MySQL backup script problem

This is my first foray into really doing anything involving cPanel and MySQL.

So here's my situation. I have several databases being hosted by a WHM account with some folks. I have only cPanel access, with no SSH option.

I need to backup these MySQL databases on a daily basis and I've been told that the best way to do it in this case would be to set up a crontab to do a mysqldump of all the databases to a folder accessible in my home directory.

So i've tried everyting i could find so far.

I used the 'standard' button to set up my crontab. Set it for 'every minute' so i'd be sure it was gonna happen right away, and then in the 'command to run' box I typed:

mysqldump --opt --all-databases > /temp/db.bak

no file was ever created, and no email received from cron (I entered my email for the output to be sent)

so I tried this:

mysqldump --opt -u USERNAME -pPASSWORD personto_mail > /temp/db.bak

then in case I was specifying the path wrong:

mysqldump --opt --all-databases > /home/personto/public_html/temp/db.bak

and then just to try another directory:

mysqldump --opt --all-databases > /home/personto/public_html/db.bak

and then I was suggested to create a scrip and tell cron to run that script.

so....I wrote this tiny little script called dan.sh:

#!/bin/sh
mysqldump --opt --all-databases > /home/personto/public_html/db.bak

placed it in the pub_html directory and changed my crontab command to be:

/home/personto/public_html/dan.sh

no love.

so I turned on the Simple CGI wrapper and put the script into the scgi-bin directory, and changed the crontab to run

/home/personto/public_hml/scgi-bin/dan.sh

Still nothing.

And thats where I'm at. I havent once received an email output...I've heard that you only get one if the script fails, but I haven't seen it run sucessfully yet so I cant really say its failing or not failing.

ANY help would be much appreciated. and please bear in mind that I do NOT have root access or an SSH or an ultra detailed knowledge of MySQL

Thanks

 

 

 

 

Top