2011-02-18 16:00:54 |
Valentine Gostev |
bug |
|
|
added bug |
2011-02-18 16:02:09 |
Valentine Gostev |
percona-xtrabackup: milestone |
|
1.6 |
|
2011-02-18 16:02:22 |
Valentine Gostev |
percona-xtrabackup: assignee |
|
Vadim Tkachenko (vadim-tk) |
|
2011-02-18 16:02:24 |
Valentine Gostev |
percona-xtrabackup: importance |
Undecided |
High |
|
2011-02-18 20:03:17 |
Valentine Gostev |
summary |
innobackupex partial backup corrupts skipped tables |
innobackupex --include doc request |
|
2011-02-18 20:10:26 |
Valentine Gostev |
description |
innobackupex from trunk
DB server: Percona Server 5.1.54-12.5 rev 188
When we create a partial backup with innobackupex, it creates the same directory structure like in mysql datadir, but puts only tables' files accoring to REGEXP.
Also it copies ibdata1 file. If we restore backup with --copy-back, InnoDB tables which were not backuped will become unavailable:
mysql> use include
Database changed
mysql> create table t1 (a varchar(20)) ENGINE=MyISAM;
Query OK, 0 rows affected (0.01 sec)
mysql> create table t2 (a varchar(20)) ENGINE=InnoDB;
Query OK, 0 rows affected (0.00 sec)
mysql> create table m1 (a varchar(20)) ENGINE=MyISAM;
Query OK, 0 rows affected (0.00 sec)
mysql> create table m2 (a varchar(20)) ENGINE=InnoDB;
Query OK, 0 rows affected (0.00 sec)
mysql> insert into t1 values (1),(2),(3);
Query OK, 3 rows affected (0.00 sec)
Records: 3 Duplicates: 0 Warnings: 0
mysql> insert into t2 values (1),(2),(3);
Query OK, 3 rows affected (0.00 sec)
Records: 3 Duplicates: 0 Warnings: 0
mysql> insert into m1 values (1),(2),(3);
Query OK, 3 rows affected (0.00 sec)
Records: 3 Duplicates: 0 Warnings: 0
mysql> insert into m2 values (1),(2),(3);
Query OK, 3 rows affected (0.00 sec)
Records: 3 Duplicates: 0 Warnings: 0
root@dev302:~# innobackupex --include="^include[.]t" /root/backup > /dev/null 2>&1
root@dev302:~# innobackupex --apply-log /root/backup/2011-02-18_18-40-41/ > /dev/null 2>&1
root@dev302:~# ls -lah backup/2011-02-18_18-40-41/
total 23M
drwxr-xr-x 5 root root 4.0K Feb 18 18:41 .
drwxr-xr-x 3 root root 4.0K Feb 18 18:40 ..
-rw-r--r-- 1 root root 342 Feb 18 18:40 backup-my.cnf
-rw-r--r-- 1 root root 5.0M Feb 18 18:41 ib_logfile0
-rw-r--r-- 1 root root 5.0M Feb 18 18:41 ib_logfile1
-rw-r--r-- 1 root root 10M Feb 18 18:41 ibdata1
drwx------ 2 root root 4.0K Feb 18 18:41 include
drwxr-xr-x 2 root root 4.0K Feb 18 18:41 mysql
-rw-r--r-- 1 root root 0 Feb 18 18:40 mysql-stderr
-rw-r--r-- 1 root root 312 Feb 18 18:41 mysql-stdout
drwx------ 2 root root 4.0K Feb 18 18:40 test
-rw-r--r-- 1 root root 10 Feb 18 18:41 xtrabackup_binary
-rw-r--r-- 1 root root 1 Feb 18 18:41 xtrabackup_binlog_info
-rw-r--r-- 1 root root 75 Feb 18 18:41 xtrabackup_checkpoints
-rw-r--r-- 1 root root 2.0M Feb 18 18:41 xtrabackup_logfile
root@dev302:~# innobackupex --copy-back /root/backup/2011-02-18_18-40-41/ > /dev/null 2>&1
mysql> select * from m2;
ERROR 1146 (42S02): Table 'include.m2' doesn't exist
Way to fix: innobackupex should not backup ibdata1 file if we use it with --include option. |
At the current moment lp:percona-xtrabackup has the innobackupex version with fixed --include options, which allows to create partial backups, specifying what MyISAM and InnoDB tables should be included to backup.
I would like to see documented option --include (especially the restore way)
1. If we restore backup into clean mysql directory we should use innobackupex with option --copy-back (after preparing backup)
2. If we want to restore some tables to the server which is in use and has some other tables we want to keep using - we should use export/import feature to restore InnoDB tables. (partial restore). |
|
2011-02-18 20:10:43 |
Valentine Gostev |
tags |
|
doc innobackupex |
|
2011-02-18 20:13:19 |
Valentine Gostev |
percona-xtrabackup: assignee |
Vadim Tkachenko (vadim-tk) |
Fred Linhoss (fred-linhoss) |
|
2011-02-18 20:13:23 |
Valentine Gostev |
percona-xtrabackup: status |
New |
Incomplete |
|
2011-02-18 20:13:28 |
Valentine Gostev |
percona-xtrabackup: status |
Incomplete |
Triaged |
|
2011-02-18 20:13:31 |
Valentine Gostev |
percona-xtrabackup: importance |
High |
Medium |
|
2011-03-19 03:26:40 |
Vadim Tkachenko |
percona-xtrabackup: milestone |
1.6 |
1.7 |
|
2011-06-02 08:37:49 |
Stewart Smith |
percona-xtrabackup: assignee |
Fred Linhoss (fred-linhoss) |
Rodrigo Gadea (rodrigo-gadea-percona) |
|
2011-06-02 08:42:14 |
Stewart Smith |
percona-xtrabackup: milestone |
1.7.0beta1 |
1.6.2 |
|
2011-07-07 23:44:51 |
Rodrigo Gadea |
percona-xtrabackup: status |
Triaged |
Fix Committed |
|
2011-07-19 07:00:13 |
Stewart Smith |
percona-xtrabackup: status |
Fix Committed |
Fix Released |
|