![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
On 21 Jul 2006 14:49:17 +0200, Antoine Junod wrote: I would like to make daily automatic full backups of my databases. I've read a few articles/books about that topic in several documents without finding any acceptable solution. I'm able to backup my Myisam and innodb tables by hand (with mysqldum) while keeping a consistent state for each db. Is it possible to automate that, ie to 1) make a list of all tables 2) define for each table if it's an Innodb or Myisam one 3) backup each table with mysqldump with the options needed by the format of the table (myisam or innodb) ? Which of the above does mysqldump *not* do for you? |
#3
| |||
| |||
|
|
The solution is the option --lock-all-tables. But I read in "The definitive guide to MySQL 5, Apress", page 354, that this options solves nothing for innodb tables (why?). |
|
My current backup script has a list of myisam tables and another list for innodb tables. These lists are hand made. I would be able to build them automaticaly. Is there a way to do that? |
#4
| |||
| |||
|
|
Antoine Junod wrote: The solution is the option --lock-all-tables. But I read in "The definitive guide to MySQL 5, Apress", page 354, that this options solves nothing for innodb tables (why?). One doesn't need to lock tables to get a consistent read, if the tables support transaction isolation. Read about REPEATABLE READ here: http://dev.mysql.com/doc/refman/5.0/...isolation.html My current backup script has a list of myisam tables and another list for innodb tables. These lists are hand made. I would be able to build them automaticaly. Is there a way to do that? The following query should get you the information you need (assuming you using MySQL 5.0): SELECT t.table_schema, t.table_name, t.table_type, t.engine FROM INFORMATION_SCHEMA.tables t; The `engine` column has values 'InnoDB', 'MyISAM', 'MEMORY'. For views, the column is NULL. See http://dev.mysql.com/doc/refman/5.0/...les-table.html |
![]() |
| Thread Tools | |
| Display Modes | |
| |