Thread Rating:
  • 6 Vote(s) - 4.33 Average
  • 1
  • 2
  • 3
  • 4
  • 5
HOW TO: Automated database backups (1 line of code + cPanel)
#21
No, this is a 4.1 mysql issue. The other thread had to do with trying to convert to utf8 through mybb, which I can't do at this time anyway. My question here is whether or not anyone using mysql 4.1 has been able to successfully complete a mysqldump through a cron job.

edit: apparently this is also a 5.0 issue. I created another new database with 5.0 and uploaded the backup. I made no changes to the charset and haven't even touched the new database. I attempted to run the cron job on the new database and got the same exact error.
Jude

If I post in your thread, please do not PM me for more help! Thanks!


Reply
#22
Strange, I was using MySQL 4.1 and just last week updated it to 5.0 with no problems. Sad
-Joe
AFreeCloud - Free Cloud-Based Web Hosting!
Reply
#23
Oh well, I guess I can't have one without the other. I'll just have to forget about the automatic backups. Sad
Jude

If I post in your thread, please do not PM me for more help! Thanks!


Reply
#24
I looked into it more and according to this link, the mysqldump and MySQL versions don't match. As it suggests, I would contact your host and have them look into it as they might have a fix in place or might have to fix it themselves.
-Joe
AFreeCloud - Free Cloud-Based Web Hosting!
Reply
#25
Yeah, I ran a help on the mysqldump, and it must be very old. Doesn't even have most of the commands it should...so it must just want to only work with version 4.0. That's a shame, but I doubt I can convince my host to upgrade if they don't want to. Toungue Darn it!

But I'll send them a quick email just to let them know the problem. thanks for looking int it! Big Grin

edit: just found out my host is using 8.23 and with a little searching, I discovered that 10.10 has been available since late 2005. I have emailed and can only hope that enough people have complained, and they will get off their lazy butts and upgrade!
Jude

If I post in your thread, please do not PM me for more help! Thanks!


Reply
#26
KuJoe Wrote:I looked into it more and according to this link, the mysqldump and MySQL versions don't match. As it suggests, I would contact your host and have them look into it as they might have a fix in place or might have to fix it themselves.
I followed the link, and it looks like your tutorial should work fine on most hosts. I'm going to try this now, thank you very much.
#
MyBB is the best forum software! Exclamation

Reply
#27
I have been doing this for years with cron. I run the following command at 1AM

mysqldump -ec --add-drop-table -uDBUSER -pPASSWD DBNAME > OUTPUTFILE.sql

the above command has worked on 4.1+ and 5.0+
then I compress it with a second cron job 30 minutes later at 1:30am

gzip -f1 -S .gz OUTPUTFILE.sql

Since you are using cron as your local user account that the site operates under, the above will dump a OUTPUTFILE.sql.gz to that users root folder (in cPanel, that is /<HOMEDIR>/<username>/OUTPUTFILE.sql.gz)

if you have a large forum I would not suggest that you email it. My forum with almost 1 million posts the zipped file is nearly 200mb.

I can set up a scheduled job on my home machine to FTP to my server and download the file that way.
Lost interest, sold my sites, will browse here once in a while. It's been fun.
Reply
#28
thanks
Reply
#29
Nice Tut :p
Might use this sometime.
Thanks, Polarbear541
Reply
#30
Doesn't cPanel allow for automatic scheduled backups?

I know I just have Direct Admin do it every night for me Toungue.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)