xtranbackup1.6的增量备份为什么 建的新表增量失效?
-- 恢复全量
[root@hqdb01 20110710]# xtrabackup --prepare --target-dir=/backup_local/mysql/full/20110710
xtrabackup Ver 1.6 Rev undefined for 5.1.55 unknown-linux-gnu (x86_64)
xtrabackup: cd to /backup_local/mysql/full/20110710
xtrabackup: This target seems to be not prepared yet.
xtrabackup: xtrabackup_logfile detected: size=2097152, start_lsn=(731876935)
xtrabackup: Temporary instance for recovery is set as followings.
xtrabackup: innodb_data_home_dir = ./
xtrabackup: innodb_data_file_path = ibdata1:10M:autoextend
xtrabackup: innodb_log_group_home_dir = ./
xtrabackup: innodb_log_files_in_group = 1
xtrabackup: innodb_log_file_size = 2097152
xtrabackup: Starting InnoDB instance for recovery.
xtrabackup: Using 104857600 bytes for buffer pool (set by --use-memory parameter)
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Compressed tables use zlib 1.2.3
InnoDB: Warning: innodb_file_io_threads is deprecated. Please use innodb_read_io_threads and innodb_write_io_threads instead
110710 12:19:22 InnoDB: Initializing buffer pool, size = 100.0M
110710 12:19:22 InnoDB: Completed initialization of buffer pool
110710 12:19:22 InnoDB: highest supported file format is Barracuda.
110710 12:19:22 Percona XtraDB (http://www.percona.com) 1.0.15-12.5 started; log sequence number 731876935
[notice (again)]
If you use binary log and don't use any hack of group commit,
the binary log position seems to be:
InnoDB: Last MySQL binlog file position 0 229, file name ./mysql-bin.000006
xtrabackup: starting shutdown with innodb_fast_shutdown = 1
110710 12:19:22 InnoDB: Starting shutdown...
110710 12:19:22 InnoDB: Shutdown completed; log sequence number 731876935
-- 恢复增量
[root@hqdb01 20110710]# xtrabackup --prepare --target-dir=/backup_local/mysql/full/20110710 --incremental-dir=/backup_local/mysql/daily/20110710
xtrabackup Ver 1.6 Rev undefined for 5.1.55 unknown-linux-gnu (x86_64)
incremental backup from 731876935 is enabled.
xtrabackup: cd to /backup_local/mysql/full/20110710
xtrabackup: This target seems to be already prepared.
xtrabackup: xtrabackup_logfile detected: size=2097152, start_lsn=(731881345)
xtrabackup: page size for /backup_local/mysql/daily/20110710/ibdata1.delta is 16384 bytes
Applying /backup_local/mysql/daily/20110710/ibdata1.delta ...
xtrabackup: page size for /backup_local/mysql/daily/20110710/um/group.ibd.delta is 16384 bytes
Applying /backup_local/mysql/daily/20110710/um/group.ibd.delta ...
xtrabackup: page size for /backup_local/mysql/daily/20110710/um/TTEST.ibd.delta is 16384 bytes
Applying /backup_local/mysql/daily/20110710/um/TTEST.ibd.delta ...
xtrabackup: page size for /backup_local/mysql/daily/20110710/um/r_user_relationship.ibd.delta is 16384 bytes
Applying /backup_local/mysql/daily/20110710/um/r_user_relationship.ibd.delta ...
xtrabackup: page size for /backup_local/mysql/daily/20110710/um/product.ibd.delta is 16384 bytes
Applying /backup_local/mysql/daily/20110710/um/product.ibd.delta ...
xtrabackup: page size for /backup_local/mysql/daily/20110710/um/user.ibd.delta is 16384 bytes
Applying /backup_local/mysql/daily/20110710/um/user.ibd.delta ...
xtrabackup: page size for /backup_local/mysql/daily/20110710/um/role.ibd.delta is 16384 bytes
Applying /backup_local/mysql/daily/20110710/um/role.ibd.delta ...
xtrabackup: page size for /backup_local/mysql/daily/20110710/test/isdt.ibd.delta is 16384 bytes
Applying /backup_local/mysql/daily/20110710/test/isdt.ibd.delta ...
xtrabackup: page size for /backup_local/mysql/daily/20110710/test/aaa.ibd.delta is 16384 bytes
Applying /backup_local/mysql/daily/20110710/test/aaa.ibd.delta ...
xtrabackup: page size for /backup_local/mysql/daily/20110710/test/cccc.ibd.delta is 16384 bytes
110710 12:19:41 InnoDB: Operating system error number 2 in a file operation.
InnoDB: The error means the system cannot find the path specified.
-- 在这里新建的表无法prepare,就报错了,为什么?
xtrabackup: error: cannot open /backup_local/mysql/full/20110710/test/cccc.ibd
xtrabackup: Error: xtrabackup_apply_delta() failed.
xtrabackup: page size for /backup_local/mysql/daily/20110710/test_innodb/t_innodb.ibd.delta is 16384 bytes
Applying /backup_local/mysql/daily/20110710/test_innodb/t_innodb.ibd.delta ...
xtrabackup: page size for /backup_local/mysql/daily/20110710/test_myisam/t_myisam.ibd.delta is 16384 bytes
Applying /backup_local/mysql/daily/20110710/test_myisam/t_myisam.ibd.delta ...
xtrabackup: Temporary instance for recovery is set as followings.
xtrabackup: innodb_data_home_dir = ./
xtrabackup: innodb_data_file_path = ibdata1:10M:autoextend
xtrabackup: innodb_log_group_home_dir = /backup_local/mysql/daily/20110710
xtrabackup: innodb_log_files_in_group = 1
xtrabackup: innodb_log_file_size = 2097152
xtrabackup: Starting InnoDB instance for recovery.
xtrabackup: Using 104857600 bytes for buffer pool (set by --use-memory parameter)
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Compressed tables use zlib 1.2.3
InnoDB: Warning: innodb_file_io_threads is deprecated. Please use innodb_read_io_threads and innodb_write_io_threads instead
110710 12:19:41 InnoDB: Initializing buffer pool, size = 100.0M
110710 12:19:41 InnoDB: Completed initialization of buffer pool
110710 12:19:41 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
110710 12:19:41 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Last MySQL binlog file position 0 1003, file name ./mysql-bin.000008
110710 12:19:41 InnoDB: Error: table 'test/cccc'
InnoDB: in InnoDB data dictionary has tablespace id 24,
InnoDB: but tablespace with that id or name does not exist. It will be removed from data dictionary.
110710 12:19:41 Percona XtraDB (http://www.percona.com) 1.0.15-12.5 started; log sequence number 731881345
[notice (again)]
If you use binary log and don't use any hack of group commit,
the binary log position seems to be:
InnoDB: Last MySQL binlog file position 0 1003, file name ./mysql-bin.000008
xtrabackup: starting shutdown with innodb_fast_shutdown = 1
110710 12:19:41 InnoDB: Starting shutdown...
110710 12:19:41 InnoDB: Shutdown completed; log sequence number 731881945
大家看到没有,标红色的部分就是因为是全量备份之后,建的新表,所以执行增量恢复的时候,过不去。
xtrabackup --prepare --target-dir=/backup_local/mysql/full/20110710 --incremental-dir=/backup_local/mysql/daily/20110710
大家有谁玩过xtrabackup的增量备份恢复,给点意见或者建议啊?谢谢了!