xtranbackup1.6的增量备份为什么 建的新表增量失效?

mysqldbd 2011-07-10 08:41:24

-- 恢复全量
[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的增量备份恢复,给点意见或者建议啊?谢谢了!


...全文
75 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
wwwwb 2011-07-15
  • 打赏
  • 举报
回复
1、在新建表后,全量备份,再增量备份
2、等待升级版本
mysqldbd 2011-07-12
  • 打赏
  • 举报
回复
[Quote=引用 5 楼 rucypli 的回复:]
zz
xtrabackup增量备份局限性
xtrabackup增量备份局限性,目前发现:
1、增删表无法增量备份
2、增删索引无法增量备份
3、增删字段无法增量备份

http://www.dbunix.com/?p=2749
[/Quote]

有解决的方案没有啊?有的话,大家share下啊!
rucypli 2011-07-11
  • 打赏
  • 举报
回复
zz
xtrabackup增量备份局限性
xtrabackup增量备份局限性,目前发现:
1、增删表无法增量备份
2、增删索引无法增量备份
3、增删字段无法增量备份

http://www.dbunix.com/?p=2749
wwwwb 2011-07-11
  • 打赏
  • 举报
回复
基本思想,增量备份是在全量备份的基础上进行的,全量备份只需执行一次,因此首次备份时先检测全量备份是否成功。由于全量备份的目录是自动建立的,因此这里如果检测到存在全量目录,就默认为全量备份是成功的。如果不存在该目录就进行全量备份。否则进行增量。增量文件目录是以时间命名的。

没有用过此软件,从上述说明来看
在新建表后,全量备份,再增量备份
mysqldbd 2011-07-11
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 rucypli 的回复:]
xtrabackup只备份InnoDB数据文件,表结构是不备份的,所以恢复的时候,你必须有对应表结构文件(.frm)。
[/Quote]


我的意思是,为什么增量中旧表的数据的变更能恢复,但是全备之后增量备份之前新建的表 不能增量恢复呢?
mysqldbd 2011-07-11
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 rucypli 的回复:]
xtrabackup只备份InnoDB数据文件,表结构是不备份的,所以恢复的时候,你必须有对应表结构文件(.frm)。
[/Quote]

你还没有明白我的意思,你是不是没有用xtrabackup做过 增量备份恢复呢?
rucypli 2011-07-11
  • 打赏
  • 举报
回复
xtrabackup只备份InnoDB数据文件,表结构是不备份的,所以恢复的时候,你必须有对应表结构文件(.frm)。

56,677

社区成员

发帖
与我相关
我的任务
社区描述
MySQL相关内容讨论专区
社区管理员
  • MySQL
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧