Making mysql backups

Is it risky to be doing mysql dumps through phpMyAdmin on databases that are ‘live’? In my case these are a gallery (least likely to be active) blog (medium likely) and three phpbb forums (most likely). I want to make backups frequently, simply, and safely.

Would mysqlhotcopy be more appropriate or is that overkill or innappropriate? I’m not entirely sure about the relationship of the database servers and my ‘home’ directory, in terms of what path I’d use. Example:

mysqlhotcopy db_name --user=username --password=password --allowold --quiet --flushlog [/path/to/new_directory]

Is that path/to/new/directory one of my usual ‘local’ paths or is it specific to the database machine itself?

Hrm. I don’t think you’ll have to worry about the databases being corrupted in any sort of way, though if you have multiple INSERTs and/or UPDATEs that are in any way dependent on each-other, there is a valid concern that you could capture some of the information and not the rest (this can be alleviated somewhat by the use of table locking, but it’s really transaction support - something we don’t currently offer - that is made for that sort of thing).

To be absolutely sure, you might want to briefly take down any commonly modified databases (more specifically, take down the scripts that modify them) and you should be okay.

  • Jeff @ DreamHost
  • DH Discussion Forum Admin