MySQL backups

Sunner

Elite Member
Oct 9, 1999
11,641
0
76
First off, I suck at anything related to databases, I'd even go so far as to say I hate databases, and I in turn am generally hated by them :)

So, with that out of the way, I have a couple of databases that I need to backup on a daily basis.
Most of the tables ar MyISAM, but some are InnoDB, and from what I've gathered, the latter can cause some problems if not done properly.
I made a very unfancy script using mysqldump, but I find various posts and such that I've Googled to be unclear and somewhat contradictory with regards to how you can backup those tables.
Would a command line such as "mysqldump --opt -A --password=xxx |bzip2 -c > whatever.sql.bz2" be sufficient to backup those tables, or do I actually have to take down the entire databases?

No big worries if it's the latter, this isn't some production critical database or anything, just a bunch of forums and stuff, and pretty much everyone who uses them are in the same timezone, +/- an hour or two, so taking it down for a little while isn't a problem at all.
If there's an easy way to do it without taking it down though, that's of course preferable :)

Basically, for me personally, the easiest way is the best way ;)
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
I would have thought that mysqldump would work better with InnoDB since it has better locking than MyISAM.
 

Sunner

Elite Member
Oct 9, 1999
11,641
0
76
Originally posted by: Nothinman
I would have thought that mysqldump would work better with InnoDB since it has better locking than MyISAM.

Well, apparently the locking is what makes it work "differently"(unsure if I should say worse considering I still haven't found a definite answer).
I was rather hoping the --opt would take care of it, but I just wanna make sure, seeing as I don't have any spare boxes that I can install MySQL on right now for testing.