Backup consistency when used in production

Aug 14, 2012 at 2:10 PM

Hi,

 

I have a database with InnoDb tables. Since I want a consistent backup, does your app take care of transactions, or table locks ?

For my case, I think a backup in a transaction "serializable" should be enough, but what about other table engines ?

 

Thanks.

Coordinator
Aug 17, 2012 at 7:57 AM

Do you mean this:

START TRANSACTION;
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;

DROP TABLE IF EXISTS `member`;
CREATE TABLE `member` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;

LOCK TABLES `member` WRITE;
INSERT INTO `member` VALUES
(1,'JAMES'),
(2, 'CHRIST'),
(3, 'JASMINE');
UNLOCK TABLES;

COMMIT;