Setup database backup cron job on godaddy hosting account
Many time you need to setup Cron Job to schedule specific task at regular interval. This article covering cron job setup on godaddy account. Godaddy account has different interface then traditional cpanel. These instructions apply to WordPress.com server installations. Here are the steps to take daily backup of DBS.
Here are the steps to setup cron job for daily backup of database.
- Log Into your GoDaddy.com account.
- Choose “My Hosting Account” from the “Hosting & Servers” menu on the top navigation bar.

- In the Hosting Account list, click the Open link beside the account you want to use for your website.

- In the Hosting Manager window, click the Cron Manager icon or “Cron Manager” menu item under content menu. Please refer snapshot below.

- Now you are on the page where you need to setup cron job. Before this, you need to collect following information with the database..Host Name: (Usually localhost but in case of godaddy account it will be look like mysql139.secureserver.net) Database Name: Name of the backup database.
User Name: User name of associative database. In case of godaddy account it will be same as db name.
DB Password: Database user password for authentication. - Please use following mysqldump command to get backup of desired database. Please change required parameter with your own.Syntax:
mysqldump –opt -Q -h (hostname) -u (user-name) –password=(password) (database-name) > (full path of backup file)Example:
mysqldump –opt -Q -h p3smysql5.secureserver.net -u mywebdb –password=password mywebdb > /home/content/b/a/b/babychep/html/backups/daily.sqlPlease replace variable with new one and put entire command in command text box. No need to use browse button here. Select how you want to run these command hourly,daily,weekly and click on save button to save cron job.
Read Related Post
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.



January 20th, 2009 at 9:26 am
[...] an article over here that shows you how to backup your GoDaddy MySQL databases using a cron job so if you’re [...]
March 10th, 2009 at 7:38 am
Of course, what a great site and informative resources, I will add backlink.
March 13th, 2009 at 2:19 pm
Hi– I tried your cron recommendation, but I haven’t been successful. Here’s the error I get via email:
———
Got error: 1045: Access denied for user ‘[username removed]‘@’[IP address removed]‘ (using password: NO) when trying to connect
———
I do have the password there in the actual script … why does it not recognize it?
March 26th, 2009 at 3:15 pm
Godaddy Requires that you have SSH enabled in order to run Cron Jobs from the Cron Manager tab now. This will allow you access to the database through Cron.
April 3rd, 2009 at 5:26 am
Nice site! Thanks for the great post. People should read this.
April 11th, 2009 at 12:28 pm
Thanks for the great tip. I am experiencing the same issue as previous poster Matt and I have SSH enabled for my site. I also have a cron job that backups up web application on my site via a script actually on my web server that works without issue. Any help would be appreciated.
June 11th, 2009 at 1:54 pm
I get the following error and like other post I am using a password
mysqldump: File ‘/usr/share/mysql/charsets/?.conf’ not found (Errcode: 2)
mysqldump: Character set ‘#33′ is not a compiled character set and is not specified in the ‘/usr/share/mysql/charsets/Index’ file
mysqldump: Got error: 1045: Access denied for user ‘removed’@'208.109.181.75′ (using password: NO) when trying to connect
July 3rd, 2009 at 7:40 am
Greetings that really is insightful, great effort for this work you’ve done. Could I replicate this post on my site?
July 8th, 2009 at 2:59 pm
Hey ive seen a lot of people having errors such as
mysqldump: Got error: 1045: Access denied for user ‘removed’@’ip′ (using password: NO)
i BELEIVE (at least i worked for me) that the error is in the article
make sure you remove the -password=YourPassword
it should be -pYourPassword… for example:
(only a -p followed bu your password WITHOUT SPACE!)
so the article SHOULD say something like this….
Please use following mysqldump command to get backup of desired database. Please change required parameter with your own.Syntax:
mysqldump –opt -Q -h (hostname) -u (user-name) –password=(password) (database-name) > (full path of backup file)
Example:
mysqldump –opt -Q -h p3smysql5.secureserver.net -u yourusername –pYoUrPaAsWorD yourdbname > /home/rourabsolutepath/html/backups/daily.sql
hope you fix the error and good luck!
July 8th, 2009 at 3:42 pm
hey everyone, here is another solution, that worked for me as well, in case you dont get the other one running… just follow all the steps listed in this article and in the cronjob field write
mysqldump -h p3smysql5.secureserver.net -uUsErNaMe -pPaSsWoRd yOuRdBnAmE > /home/absolutepath/dump.txt
where you need to update where it says ‘p3smysql5.secureserver.net’ for your own server address,
‘UsErNaMe’ with your username,
‘PaSsWoRd’ for your own password,
‘yOuRdBnAmE’ for your database name, and
‘/home/absolutepath/’ for your absolute path
cheers….
July 8th, 2009 at 4:16 pm
well, this is my third post today, but i hope it helps
its one last small addition to my last solution
you might also wanna add the date to the file name of the backup, just in case you dont want the file to be overidden everytime it backs itself up, you can have a copy of everyday backup….
just ass this to the file name: dump_$(date +” “\%d\%m\%Y).txt
so it would look like this:
mysqldump -h p3smysql5.secureserver.net -uUsErNaMe -pPaSsWoRd yOuRdBnAmE > /home/absolutepath/dump_$(date +” “\%d\%m\%Y).txt
where you need to update where it says ‘p3smysql5.secureserver.net’ for your own server address,
‘UsErNaMe’ with your username,
‘PaSsWoRd’ for your own password,
‘yOuRdBnAmE’ for your database name, and
‘/home/absolutepath/’ for your absolute path
have a great day!
August 21st, 2009 at 1:39 pm
One minor point. I am not sure if it is my browser, or something with your editor, but the commands should be:
–opt and
–password
ie minus minus
not a long dash. I think that this is what is causing some of the problems.
Thanks though, once I figured this, it solved my issue.
August 21st, 2009 at 8:34 pm
yes right, editor automatically change two continuous dash to one long dash. Thanks your tips.. I will check and fix issue asap..
August 24th, 2009 at 5:54 am
not working
February 7th, 2010 at 9:03 am
Very usefull blog
February 7th, 2010 at 9:16 am
good stuff here
March 15th, 2010 at 6:01 am
Thanks for the tips. I tried to use all the notes here to get it to work and FINALLY did with some tweaking.
First off: with Godaddy you need to be using SSH! Make that switch first, this will take a couple of days.
2nd my cron job is as follows:
mysqldump –opt -Q -h yourdomainname.com -uusername -pPassword databasenamesameasusernameusually | gzip > /home/content/a/b/c/abc/html/backups/databasebackup_`date +\%Y\%m\%d\%H\%M\%S`.sql.gz
Keep in mind: no space between the -u and username. no space between the -p and password. Also for the date code, backword slashes (\) before the % signs. Hope this helps others.