免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3012 | 回复: 4
打印 上一主题 下一主题

【讨论中】innobackupex问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2012-11-29 17:01 |只看该作者 |倒序浏览
本帖最后由 cenalulu 于 2012-11-30 13:53 编辑

当使用innobackupex备份数据库时会产生xtrabackup_checkpoint文件。这个文件里边有to_lsn和last_lsn,这两个有什么关系?而且这两个值有时候相等,有时候last_lsn大,而有时候to_lsn大,为什么?

Help me!

论坛徽章:
8
CU大牛徽章
日期:2013-09-18 15:20:48CU大牛徽章
日期:2013-09-18 15:20:58CU大牛徽章
日期:2013-09-18 15:21:06CU大牛徽章
日期:2013-09-18 15:21:12CU大牛徽章
日期:2013-09-18 15:21:17天秤座
日期:2013-10-30 14:01:03摩羯座
日期:2013-11-29 18:02:31luobin
日期:2016-06-17 17:46:36
2 [报告]
发表于 2012-11-29 21:04 |只看该作者
@syzxlyx_cu
我这里 last_lsn和to_lsn都是一样的。我找了手册,也没找到专门说last_lsn是啥意思的

论坛徽章:
0
3 [报告]
发表于 2012-11-30 10:40 |只看该作者
chinafenghao 发表于 2012-11-29 21:04
@syzxlyx_cu
我这里 last_lsn和to_lsn都是一样的。我找了手册,也没找到专门说last_lsn是啥意思的


终于有人回复了!谢谢!
我这边的情况是有个项目使用这个工具备份,其中有还几台机器的备份不可用,但备份日志显示正常,分析原因时发现备份日志中的increment lsn和to_lsn相等的备份就可用,那时注意到increment lsn和to_lsn不相等,同时发现to_lsn比last_lsn大,翻文档无果。向percano反映这个问题,即备份正常但备份集不可用,表现在:
InnoDB: Failing assertion: addr.page == FIL_NULL || addr.boffset >= FIL_PAGE_DATA
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/ ... nnodb-recovery.html
InnoDB: about forcing recovery.
innobackupex: Error:
innobackupex: ibbackup failed at /root/percona-xtrabackup-2.0.3/bin/innobackupex line 378.

但他认为我的备份有问题,没正常完成。但我的备份日志记录的是:
121102 04:04:43  innobackupex: completed OK!

不知版主对这个问题怎么看?你那边的备份始终是to_lsn和last_lsn相等吗?我的版本是2.0.3

论坛徽章:
8
CU大牛徽章
日期:2013-09-18 15:20:48CU大牛徽章
日期:2013-09-18 15:20:58CU大牛徽章
日期:2013-09-18 15:21:06CU大牛徽章
日期:2013-09-18 15:21:12CU大牛徽章
日期:2013-09-18 15:21:17天秤座
日期:2013-10-30 14:01:03摩羯座
日期:2013-11-29 18:02:31luobin
日期:2016-06-17 17:46:36
4 [报告]
发表于 2012-11-30 12:28 |只看该作者
@syzxlyx_cu
你备份的过程和code 贴出来,大家一起分析下

论坛徽章:
0
5 [报告]
发表于 2012-11-30 17:23 |只看该作者
本帖最后由 syzxlyx_cu 于 2012-11-30 17:27 编辑


备份过程无任何报错。但是The latest check point (for incremental)在to_lsn---last_lsn之外
备份过程摘录:
export MYSQL_DATADIR=/home/mysql/${platform}_${sid}
export MYSQL_BACKDIR_BASE=/home/data/${platform}-${sid}-bak
export BINLOG_FILE_PREFIX=${platform}_${sid}
export BINLOG_DIR=/home/mysql/binlog/
export INNOBACKUPEX=/usr/bin/innobackupex
export BACKUP_LOG=/home/mysql/${platform}_${sid}/mysql-backup.log
$INNOBACKUPEX --host=127.0.0.1 --port=${dbport} --user=${dbuser} --password="${dbpass}" --defaults-file=/etc/${platform}_${sid}.cnf $MYSQL_BACKDIR 2>>$BACKUP_LOG

备份日志:

InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
and Percona Inc 2009-2012.  All Rights Reserved.

This software is published under
the GNU GENERAL PUBLIC LICENSE Version 2, June 1991.

121102 04:04:01  innobackupex: Starting mysql with options:
--defaults-file='/etc/game2_4.cnf' --password=xxxxxxxx --user='back'
--host='127.0.0.1' --port='3307' --unbuffered --
121102 04:04:01  innobackupex: Connected to database with mysql child
process (pid=1117)
121102 04:04:07  innobackupex: Connection to database server closed
IMPORTANT: Please check that the backup run completes successfully.
           At the end of a successful backup run innobackupex
           prints "completed OK!".

innobackupex: Using mysql  Ver 14.14 Distrib 5.5.15, for Linux (x86_64)
using  EditLine wrapper
innobackupex: Using mysql server version Copyright (c) 2000, 2010, Oracle
and/or its affiliates. All rights reserved.

innobackupex: Created backup directory
/data/game2-4-bak/20121102/2012-11-02_04-04-07
121102 04:04:07  innobackupex: Starting mysql with options:
--defaults-file='/etc/game2_4.cnf' --password=xxxxxxxx --user='back'
--host='127.0.0.1' --port='3307' --unbuffered --
121102 04:04:07  innobackupex: Connected to database with mysql child
process (pid=1143)
121102 04:04:09  innobackupex: Connection to database server closed

121102 04:04:09  innobackupex: Starting ibbackup with command:
xtrabackup_55  --defaults-file="/etc/game2_4.cnf"
--defaults-group="mysqld" --backup --suspend-at-end
--target-dir=/data/game2-4-bak/20121102/2012-11-02_04-04-07
innobackupex: Waiting for ibbackup (pid=1150) to suspend
innobackupex: Suspend file
'/data/game2-4-bak/20121102/2012-11-02_04-04-07/xtrabackup_suspended'

xtrabackup_55 version 2.0.3 for Percona Server 5.5.16 Linux (x86_64)
(revision id: 470)
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /home/mysql/game2_4
xtrabackup: Target instance is assumed 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 = 2
xtrabackup:   innodb_log_file_size = 104857600
121102  4:04:10 InnoDB: Using Linux native AIO
xtrabackup: using O_DIRECT
121102  4:04:10  InnoDB: Warning: allocated tablespace 271, old maximum was 9
>> log scanned up to (15049348096)
[01] Copying ./ibdata1 to
/data/game2-4-bak/20121102/2012-11-02_04-04-07/ibdata1
[01]        ...done
……
……
……

>> log scanned up to (15049348096)
[01]        ...done

>> log scanned up to (15049348096)
[01]        ...done

>> log scanned up to (15049348096)

121102 04:04:25  innobackupex: Continuing after ibbackup has suspended
121102 04:04:25  innobackupex: Starting mysql with options:
--defaults-file='/etc/game2_4.cnf' --password=xxxxxxxx --user='back'
--host='127.0.0.1' --port='3307' --unbuffered --
121102 04:04:25  innobackupex: Connected to database with mysql child
process (pid=1164)
121102 04:04:28  innobackupex: Starting to lock all tables...
>> log scanned up to (15049348096)
>> log scanned up to (15049348096)
121102 04:04:38  innobackupex: All tables locked and flushed to disk

121102 04:04:38  innobackupex: Starting to backup .frm, .MRG, .MYD, .MYI,
innobackupex: .TRG, .TRN, .ARM, .ARZ, .CSM, .CSV and .opt files in
innobackupex: subdirectories of '/home/mysql/game2_4'
innobackupex: Backing up files
'/home/mysql/game2_4/mysql/*.{frm,MYD,MYI,MRG,TRG,TRN,ARM,ARZ,CSM,CSV,opt,par}'
(72 files)
innobackupex: Backing up files
'/home/mysql/game2_4/char/*.{frm,MYD,MYI,MRG,TRG,TRN,ARM,ARZ,CSM,CSV,opt,par}'
(54 files)
i……
……
……
innobackupex: Backing up files
'/home/mysql/game2_4/performance_schema/*.{frm,MYD,MYI,MRG,TRG,TRN,ARM,ARZ,CSM,CSV,opt,par}'
(18 files)
121102 04:04:40  innobackupex: Finished backing up .frm, .MRG, .MYD, .MYI,
.TRG, .TRN, .ARM, .ARZ, .CSV, .CSM and .opt files

innobackupex: Resuming ibbackup

xtrabackup: The latest check point (for incremental): '15049700513'
xtrabackup: Stopping log copying thread.
.>> log scanned up to (15049348096)

xtrabackup: Transaction log of lsn (15049348375) to (15049348096) was
copied.
121102 04:04:43  innobackupex: All tables unlocked
121102 04:04:43  innobackupex: Connection to database server closed

innobackupex: Backup created in directory
'/data/game2-4-bak/20121102/2012-11-02_04-04-07'
innobackupex: MySQL binlog position: filename 'game2_4.000034', position
413785124
121102 04:04:43  innobackupex: completed OK!

备份文件# more xtrabackup_checkpoints
backup_type = full-backuped
from_lsn = 0
to_lsn = 15049700513
last_lsn = 15049348096
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP