Option 2 will not work. InnoDB has background threads that continue
to change data even when the database is "quiet".
This is a simplification. The details are too complicated to write in
this thread, but there's an entire chapter on this topic in the book
I'm writing right now, High Performance MySQL 2nd Edition :-) Suffice
to say you *can* take backups by copying files with InnoDB, but you
have to know what you're doing. You should use an LVM snapshot to get
a consistent point-in-time snapshot of the files.
You might try using mylvmbackup.
On Jan 28, 2008 8:43 AM, Michaël de Groot <michael@stripped> wrote:
> Hi Alex,
> I've used this method to start a replication slave without using MySQLdump to get the
> data from one machine to another.
> Option 1 works for sure,
> Options 3 and 4 do not work for sure (if a .MYI, .MYD or ibdatax file is changed
> while you are copying, you get a broken file on the other end).
> I'm not sure about option 2, but I think it should work.
> Best regards,
> > -----Oorspronkelijk bericht-----
> > Van: alex.ksikes@stripped [mailto:alex.ksikes@stripped] Namens Alex K
> > Verzonden: maandag 28 januari 2008 14:34
> > Aan: MySQL General List
> > Onderwerp: backup questions
> > Hi guys,
> > Is it safe to perform a backup of a database by copying its mysql
> > files if the database is:
> > 1) MyISAM and the database is not being used (mysql server turned off)?
> > 2) InnoDB and and the database is not being used?
> > 3) MyISAM and the database is being used?
> > 4) InnoDB and and the database is being used?
> > I know I can use mysqhotcopy or mysqldump but I'm just curious if it's
> > possible to perform a backup by simply copying the files over in the
> > conditions described above.
> > Thank you so much,
> > Alex
> > --
> > MySQL General Mailing List
> > For list archives: http://lists.mysql.com/mysql
> > To unsubscribe: http://lists.mysql.com/mysql?unsub=1
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=1