preparing a partial backup creates spurious "missing" .ibds
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona XtraBackup moved to https://jira.percona.com/projects/PXB |
Triaged
|
Medium
|
Unassigned | ||
2.1 |
Triaged
|
Medium
|
Unassigned | ||
2.2 |
Triaged
|
Medium
|
Unassigned | ||
2.3 |
Triaged
|
Medium
|
Unassigned |
Bug Description
In xtrabackup 2.2.6, if I prepare a partial backup consisting of the the InnoDB shared tablespaces and .ibd files I wish to restore along the xtrabackup generated files, innobackupex --apply-log recreates a subset of the missing .ibds presumably based on the contents of the xtrabackup_logfile obtained during the backup.
Previous versions of xtrabackup seemed to have more expected behavior where it warned about missing tablespaces, and otherwise silently dropped them from the data dictionary without attempting to create the missing .ibd files.
Before innobackup --apply-log:
# ls -1 ./staging/
backup-my.cnf
ibdata1
mydb/
xtrabackup_
xtrabackup_
xtrabackup_info
xtrabackup_logfile
After innobackupex --apply-log
# ls -1 ./staging/
backup-my.cnf
ibdata1
mydb/
db00/
db01/
db02/
...
xtrabackup_
xtrabackup_
xtrabackup_info
xtrabackup_logfile
Where these dbXX databases are populated with .ibd files only, created during the apply-log phase.
Changed in percona-xtrabackup: | |
status: | Incomplete → New |
I could not reproduce this with PS 5.6.21 and Xtrabackup 2.2.6. Can you able to provide exact steps for taking backup and apply-log?
Taking backup for only "nil" DB.
nilnandan@ Dell-XPS: ~$ sudo innobackupex --user=root --password=root --databases="nil" /home/nilnandan /backup
[sudo] password for nilnandan:
...
innobackupex: Using server version 5.6.21-70.1
innobackupex: Created backup directory /home/nilnandan /backup/ 2014-12- 09_10-22- 24
141209 10:22:24 innobackupex: Starting ibbackup with command: xtrabackup --defaults- group=" mysqld" --backup --suspend-at-end --target- dir=/home/ nilnandan/ backup/ 2014-12- 09_10-22- 24 --innodb_ log_file_ size="50331648" --innodb_ data_file_ path="ibdata1: 12M:autoextend" --tmpdir=/tmp --extra- lsndir= '/tmp' --databases='nil' nilnandan/ backup/ 2014-12- 09_10-22- 24/xtrabackup_ suspended_ 2'
innobackupex: Waiting for ibbackup (pid=5653) to suspend
innobackupex: Suspend file '/home/
xtrabackup version 2.2.6 based on MySQL server 5.6.21 Linux (x86_64) (revision id: ) data_home_ dir = ./ data_file_ path = ibdata1: 12M:autoextend log_group_ home_dir = ./ log_files_ in_group = 2 log_file_ size = 50331648 /backup/ 2014-12- 09_10-22- 24/ibdata1 nilnandan/ backup/ 2014-12- 09_10-22- 24/xtrabackup_ suspended_ 2' with pid '5654'
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /var/lib/mysql
xtrabackup: open files limit requested 0, set to 1024
xtrabackup: using the following InnoDB configuration:
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: innodb_
>> log scanned up to (38314921)
xtrabackup: Generating a list of tablespaces
[01] Copying ./ibdata1 to /home/nilnandan
[01] ...done
>> log scanned up to (38314921)
xtrabackup: Creating suspend file '/home/
141209 10:22:26 innobackupex: Continuing after ibbackup has suspended
141209 10:22:26 innobackupex: Executing LOCK TABLES FOR BACKUP...
141209 10:22:26 innobackupex: Backup tables lock acquired
141209 10:22:26 innobackupex: Starting to backup non-InnoDB tables and files mysql// nil/db. opt' mysql// nil/test. frm'
innobackupex: in subdirectories of '/var/lib/mysql/'
innobackupex: Backing up file '/var/lib/
innobackupex: Backing up file '/var/lib/
141209 10:22:26 innobackupex: Finished backing up non-InnoDB tables and files
141209 10:22:26 innobackupex: Executing LOCK BINLOG FOR BACKUP...
>> log scanned up to (38314921)
141209 10:22:26 innobackupex: Executing FLUSH ENGINE LOGS...
141209 10:22:26 innobackupex: Waiting for log copying to finish
xtrabackup: The latest check point (for incremental): '38314921'
xtrabackup: Stopping log copying thread.
.>> log scanned up to (38314921)
xtrabackup: Creating suspend file '/home/ nilnandan/ backup/ 2014-12- 09_10-22- 24/xtrabackup_ log_copied' with pid '5654'
xtrabackup: Transaction log of lsn (38314921) to (38314921) was copied.
141209 10:22:27 innobackupex: Executing UNLOCK BINLOG
141209 10:22:27 innobackupex: Executing UNLOCK TABLES
141209 10:22:27 innobackupex: All tables unlocked
innobackupex: Backup created in directory '/home/ nilnandan/ backup/ 2014-12- 09_10-22- 24'
141209 10:22:27 innobackupex: Connection to database server closed
141209 10:22:27 innobackupex: completed OK!
nilnandan@Del...