[TriLUG] MySql backup

Greg Cox glcox at pobox.com
Fri Mar 21 09:32:44 EST 2003


On 21 Mar 2003, Michael Thompson wrote:

> I am fairly new to mysql myself but I beleive if you back up the
> directories in /var/lib/mysql you will get all of the databases.

As other people have said, this is correct, except data is in flight
because the service is up.  So, to add to what they said,
if you really want to do this, though, check `mysqlhotcopy`.

Pro: much faster than mysqldump.
Con: not portable to anything but mysql (but, then
  again, MySQL SQL is hardly the model of "portable."

I only found this one because mysqldump was taking ~80 seconds
of lock'ed time.  hotcopy got it down to ~2s.  Huge improvement.
Like when your customer is a paranoid dinky company who
thinks their data needs to be backed up hourly so they can
roll back if their server blows up, even if they have no
backup server upon which to restore said system.

. o O (  Oops, did I verbalize my internal monologue?  )





More information about the TriLUG mailing list