您的位置:首页 > 其它

percona-data-recovery-tool-for-innodb-0.5工具修复丢失数据

2013-01-17 13:36 821 查看
一款开源的MySQL数据库InnoDB数据恢复工具:innodb-tools,它通过从原始数据文件中提取表的行记录,实现从丢失的或者被毁坏的MySQL表中恢复数据。例如,当你不小心执行DROP TABLE、TRUNCATE TABLE或者DROP DATABASE之后,可以通过以下方式恢复数据。

下载工具包;wget https://launchpad.net/percona-data-recovery-tool-for-innodb/trunk/release-0.5/+download/percona-data-recovery-tool-for-innodb-0.5.tar.gz
解压工具包:tar -zxvf percona-data-recovery-tool-for-innodb-0.5.tar.gz

check文件:进入香港的mysql-source进行./configure检查相关的包和文件是否完整;

config.status: creating mtr/Makefile

config.status: creating page/Makefile

config.status: creating pars/Makefile

config.status: creating que/Makefile

config.status: creating read/Makefile

config.status: creating rem/Makefile

config.status: creating row/Makefile

config.status: creating srv/Makefile

config.status: creating sync/Makefile

config.status: creating thr/Makefile

config.status: creating trx/Makefile

config.status: creating usr/Makefile

config.status: creating ib_config.h

config.status: executing depfiles commands

MySQL has a Web site at http://www.mysql.com/ which carries details on the

latest release, upcoming features, and other information to make your

work or play with MySQL more productive. There you can also find

information about mailing lists for MySQL discussion.

Remember to check the platform specific part of the reference manual for

hints about installing MySQL on your platform. Also have a look at the

files in the Docs directory.

Thank you for choosing MySQL!

[root@slave01 mysql-source]#

[root@slave01 mysql-source]# ls

aclocal.m4 configure libmysqld mysys stamp-h1

bdb configure.in libmysql_r ndb strings

BUILD dbug libtool netware support-files

client debian ltmain.sh os2 tests

cmd-line-utils depcomp Makefile pstack tools

config Docs Makefile.am regex vio

config.guess extra Makefile.in scripts win

config.h heap man server-tools zlib

config.h.in include missing sql

config.log innobase myisam sql-bench

config.status install-sh myisammrg sql-common

config.sub libmysql mysql-test SSL

[root@slave01 mysql-source]# cd ..

[root@slave01 percona-data-recovery-tool-for-innodb-0.5]# make

mkdir lib

cd mysql-source/include && make my_config.h

make[1]: Entering directory `/usr/local/percona-data-recovery-tool-for-innodb-0.5/mysql-source/include'

make[2]: Entering directory `/usr/local/percona-data-recovery-tool-for-innodb-0.5/mysql-source'

make[2]: Leaving directory `/usr/local/percona-data-recovery-tool-for-innodb-0.5/mysql-source'

/bin/cp ../config.h my_config.h

make[1]: Leaving directory `/usr/local/percona-data-recovery-tool-for-innodb-0.5/mysql-source/include'

gcc -DHAVE_OFFSET64_T -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE_SOURCE=1 -Wall -O3 -g -I include -I mysql-source/include -I mysql-source/innobase/include -c tables_dict.c -o lib/tables_dict.o

gcc -DHAVE_OFFSET64_T -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE_SOURCE=1 -Wall -O3 -g -I include -I mysql-source/include -I mysql-source/innobase/include -c print_data.c -o lib/print_data.o

print_data.c: In function 鈍et_int_value?

print_data.c:138: warning: integer constant is too large for 鈛nsigned long?type

print_data.c:138: warning: integer constant is too large for 鈛nsigned long?type

gcc -DHAVE_OFFSET64_T -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE_SOURCE=1 -Wall -O3 -g -I include -I mysql-source/include -I mysql-source/innobase/include -c check_data.c -o lib/check_data.o

cd mysql-source/innobase/ut && make libut.a

make[1]: Entering directory `/usr/local/percona-data-recovery-tool-for-innodb-0.5/mysql-source/innobase/ut'

if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I./../include -I./../../include -I../../include -DDBUG_OFF -O3 -DDBUG_OFF -DDEBUG_OFF -DUNIV_LINUX -DUNIV_INTEL_X86 -MT ut0byte.o -MD -MP -MF ".deps/ut0byte.Tpo" -c -o ut0byte.o ut0byte.c; \

then mv -f ".deps/ut0byte.Tpo" ".deps/ut0byte.Po"; else rm -f ".deps/ut0byte.Tpo"; exit 1; fi

if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I./../include -I./../../include -I../../include -DDBUG_OFF -O3 -DDBUG_OFF -DDEBUG_OFF -DUNIV_LINUX -DUNIV_INTEL_X86 -MT ut0dbg.o -MD -MP -MF ".deps/ut0dbg.Tpo" -c -o ut0dbg.o ut0dbg.c; \

then mv -f ".deps/ut0dbg.Tpo" ".deps/ut0dbg.Po"; else rm -f ".deps/ut0dbg.Tpo"; exit 1; fi

if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I./../include -I./../../include -I../../include -DDBUG_OFF -O3 -DDBUG_OFF -DDEBUG_OFF -DUNIV_LINUX -DUNIV_INTEL_X86 -MT ut0mem.o -MD -MP -MF ".deps/ut0mem.Tpo" -c -o ut0mem.o ut0mem.c; \

then mv -f ".deps/ut0mem.Tpo" ".deps/ut0mem.Po"; else rm -f ".deps/ut0mem.Tpo"; exit 1; fi

if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I./../include -I./../../include -I../../include -DDBUG_OFF -O3 -DDBUG_OFF -DDEBUG_OFF -DUNIV_LINUX -DUNIV_INTEL_X86 -MT ut0rnd.o -MD -MP -MF ".deps/ut0rnd.Tpo" -c -o ut0rnd.o ut0rnd.c; \

then mv -f ".deps/ut0rnd.Tpo" ".deps/ut0rnd.Po"; else rm -f ".deps/ut0rnd.Tpo"; exit 1; fi

if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I./../include -I./../../include -I../../include -DDBUG_OFF -O3 -DDBUG_OFF -DDEBUG_OFF -DUNIV_LINUX -DUNIV_INTEL_X86 -MT ut0ut.o -MD -MP -MF ".deps/ut0ut.Tpo" -c -o ut0ut.o ut0ut.c; \

then mv -f ".deps/ut0ut.Tpo" ".deps/ut0ut.Po"; else rm -f ".deps/ut0ut.Tpo"; exit 1; fi

rm -f libut.a

ar cru libut.a ut0byte.o ut0dbg.o ut0mem.o ut0rnd.o ut0ut.o

ranlib libut.a

make[1]: Leaving directory `/usr/local/percona-data-recovery-tool-for-innodb-0.5/mysql-source/innobase/ut'

ln -fs ../mysql-source/innobase/ut/libut.a lib/libut.a

cd mysql-source/strings && make libmystrings.a

make[1]: Entering directory `/usr/local/percona-data-recovery-tool-for-innodb-0.5/mysql-source/strings'

gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O3 -DDBUG_OFF -MT strxmov.o -MD -MP -MF .deps/strxmov.Tpo -c -o strxmov.o strxmov.c

mv -f .deps/strxmov.Tpo .deps/strxmov.Po

gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O3 -DDBUG_OFF -MT bmove_upp.o -MD -MP -MF .deps/bmove_upp.Tpo -c -o bmove_upp.o bmove_upp.c

mv -f .deps/bmove_upp.Tpo .deps/bmove_upp.Po

gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O3 -DDBUG_OFF -MT strappend.o -MD -MP -MF .deps/strappend.Tpo -c -o strappend.o strappend.c

mv -f .deps/strappend.Tpo .deps/strappend.Po

gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O3 -DDBUG_OFF -MT strcont.o -MD -MP -MF .deps/strcont.Tpo -c -o strcont.o strcont.c

mv -f .deps/strcont.Tpo .deps/strcont.Po

gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O3 -DDBUG_OFF -MT strend.o -MD -MP -MF .deps/strend.Tpo -c -o strend.o strend.c

mv -f .deps/strend.Tpo .deps/strend.Po

gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O3 -DDBUG_OFF -MT strfill.o -MD -MP -MF .deps/strfill.Tpo -c -o strfill.o strfill.c

mv -f .deps/strfill.Tpo .deps/strfill.Po

gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O3 -DDBUG_OFF -MT strcend.o -MD -MP -MF .deps/strcend.Tpo -c -o strcend.o strcend.c

mv -f .deps/strcend.Tpo .deps/strcend.Po

gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O3 -DDBUG_OFF -MT is_prefix.o -MD -MP -MF .deps/is_prefix.Tpo -c -o is_prefix.o is_prefix.c

mv -f .deps/is_prefix.Tpo .deps/is_prefix.Po

gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O3 -DDBUG_OFF -MT strstr.o -MD -MP -MF .deps/strstr.Tpo -c -o strstr.o strstr.c

mv -f .deps/strstr.Tpo .deps/strstr.Po

gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O3 -DDBUG_OFF -MT strinstr.o -MD -MP -MF .deps/strinstr.Tpo -c -o strinstr.o strinstr.c

mv -f .deps/strinstr.Tpo .deps/strinstr.Po

gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O3 -DDBUG_OFF -MT strmake.o -MD -MP -MF .deps/strmake.Tpo -c -o strmake.o strmake.c

mv -f .deps/strmake.Tpo .deps/strmake.Po

gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O3 -DDBUG_OFF -MT strnmov.o -MD -MP -MF .deps/strnmov.Tpo -c -o strnmov.o strnmov.c

mv -f .deps/strnmov.Tpo .deps/strnmov.Po

gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O3 -DDBUG_OFF -MT strmov.o -MD -MP -MF .deps/strmov.Tpo -c -o strmov.o strmov.c

mv -f .deps/strmov.Tpo .deps/strmov.Po

gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O3 -DDBUG_OFF -MT longlong2str.o -MD -MP -MF .deps/longlong2str.Tpo -c -o longlong2str.o longlong2str.c

mv -f .deps/longlong2str.Tpo .deps/longlong2str.Po

gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O3 -DDBUG_OFF -MT bfill.o -MD -MP -MF .deps/bfill.Tpo -c -o bfill.o bfill.c

mv -f .deps/bfill.Tpo .deps/bfill.Po

gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O3 -DDBUG_OFF -MT bmove.o -MD -MP -MF .deps/bmove.Tpo -c -o bmove.o bmove.c

mv -f .deps/bmove.Tpo .deps/bmove.Po

gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O3 -DDBUG_OFF -MT bmove512.o -MD -MP -MF .deps/bmove512.Tpo -c -o bmove512.o bmove512.c

mv -f .deps/bmove512.Tpo .deps/bmove512.Po

gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O3 -DDBUG_OFF -MT bchange.o -MD -MP -MF .deps/bchange.Tpo -c -o bchange.o bchange.c

mv -f .deps/bchange.Tpo .deps/bchange.Po

gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O3 -DDBUG_OFF -MT strxnmov.o -MD -MP -MF .deps/strxnmov.Tpo -c -o strxnmov.o strxnmov.c

mv -f .deps/strxnmov.Tpo .deps/strxnmov.Po

gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O3 -DDBUG_OFF -MT int2str.o -MD -MP -MF .deps/int2str.Tpo -c -o int2str.o int2str.c

mv -f .deps/int2str.Tpo .deps/int2str.Po

gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O3 -DDBUG_OFF -MT str2int.o -MD -MP -MF .deps/str2int.Tpo -c -o str2int.o str2int.c

mv -f .deps/str2int.Tpo .deps/str2int.Po

gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O3 -DDBUG_OFF -MT r_strinstr.o -MD -MP -MF .deps/r_strinstr.Tpo -c -o r_strinstr.o r_strinstr.c

mv -f .deps/r_strinstr.Tpo .deps/r_strinstr.Po

gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O3 -DDBUG_OFF -MT strtod.o -MD -MP -MF .deps/strtod.Tpo -c -o strtod.o strtod.c

mv -f .deps/strtod.Tpo .deps/strtod.Po

gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O3 -DDBUG_OFF -MT bcmp.o -MD -MP -MF .deps/bcmp.Tpo -c -o bcmp.o bcmp.c

mv -f .deps/bcmp.Tpo .deps/bcmp.Po

gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O3 -DDBUG_OFF -MT strtol.o -MD -MP -MF .deps/strtol.Tpo -c -o strtol.o strtol.c

mv -f .deps/strtol.Tpo .deps/strtol.Po

gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O3 -DDBUG_OFF -MT strtoul.o -MD -MP -MF .deps/strtoul.Tpo -c -o strtoul.o strtoul.c

mv -f .deps/strtoul.Tpo .deps/strtoul.Po

gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O3 -DDBUG_OFF -MT strtoll.o -MD -MP -MF .deps/strtoll.Tpo -c -o strtoll.o strtoll.c

mv -f .deps/strtoll.Tpo .deps/strtoll.Po

gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O3 -DDBUG_OFF -MT strtoull.o -MD -MP -MF .deps/strtoull.Tpo -c -o strtoull.o strtoull.c

mv -f .deps/strtoull.Tpo .deps/strtoull.Po

gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O3 -DDBUG_OFF -MT llstr.o -MD -MP -MF .deps/llstr.Tpo -c -o llstr.o llstr.c

mv -f .deps/llstr.Tpo .deps/llstr.Po

gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O3 -DDBUG_OFF -MT strnlen.o -MD -MP -MF .deps/strnlen.Tpo -c -o strnlen.o strnlen.c

mv -f .deps/strnlen.Tpo .deps/strnlen.Po

gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O3 -DDBUG_OFF -MT ctype.o -MD -MP -MF .deps/ctype.Tpo -c -o ctype.o ctype.c

mv -f .deps/ctype.Tpo .deps/ctype.Po

gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O3 -DDBUG_OFF -MT ctype-simple.o -MD -MP -MF .deps/ctype-simple.Tpo -c -o ctype-simple.o ctype-simple.c

mv -f .deps/ctype-simple.Tpo .deps/ctype-simple.Po

gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O3 -DDBUG_OFF -MT ctype-mb.o -MD -MP -MF .deps/ctype-mb.Tpo -c -o ctype-mb.o ctype-mb.c

mv -f .deps/ctype-mb.Tpo .deps/ctype-mb.Po

gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O3 -DDBUG_OFF -MT ctype-utf8.o -MD -MP -MF .deps/ctype-utf8.Tpo -c -o ctype-utf8.o ctype-utf8.c

mv -f .deps/ctype-utf8.Tpo .deps/ctype-utf8.Po

gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O3 -DDBUG_OFF -MT ctype-bin.o -MD -MP -MF .deps/ctype-bin.Tpo -c -o ctype-bin.o ctype-bin.c

mv -f .deps/ctype-bin.Tpo .deps/ctype-bin.Po

gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O3 -DDBUG_OFF -MT ctype-latin1.o -MD -MP -MF .deps/ctype-latin1.Tpo -c -o ctype-latin1.o ctype-latin1.c

mv -f .deps/ctype-latin1.Tpo .deps/ctype-latin1.Po

gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O3 -DDBUG_OFF -MT my_vsnprintf.o -MD -MP -MF .deps/my_vsnprintf.Tpo -c -o my_vsnprintf.o my_vsnprintf.c

mv -f .deps/my_vsnprintf.Tpo .deps/my_vsnprintf.Po

gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O3 -DDBUG_OFF -MT xml.o -MD -MP -MF .deps/xml.Tpo -c -o xml.o xml.c

mv -f .deps/xml.Tpo .deps/xml.Po

gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O3 -DDBUG_OFF -MT decimal.o -MD -MP -MF .deps/decimal.Tpo -c -o decimal.o decimal.c

mv -f .deps/decimal.Tpo .deps/decimal.Po

gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O3 -DDBUG_OFF -MT my_strtoll10.o -MD -MP -MF .deps/my_strtoll10.Tpo -c -o my_strtoll10.o my_strtoll10.c

mv -f .deps/my_strtoll10.Tpo .deps/my_strtoll10.Po

gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O3 -DDBUG_OFF -MT str_alloc.o -MD -MP -MF .deps/str_alloc.Tpo -c -o str_alloc.o str_alloc.c

mv -f .deps/str_alloc.Tpo .deps/str_alloc.Po

rm -f libmystrings.a

ar cru libmystrings.a strxmov.o bmove_upp.o strappend.o strcont.o strend.o strfill.o strcend.o is_prefix.o strstr.o strinstr.o strmake.o strnmov.o strmov.o longlong2str.o bfill.o bmove.o bmove512.o bchange.o strxnmov.o int2str.o str2int.o r_strinstr.o strtod.o
bcmp.o strtol.o strtoul.o strtoll.o strtoull.o llstr.o strnlen.o ctype.o ctype-simple.o ctype-mb.o ctype-utf8.o ctype-bin.o ctype-latin1.o my_vsnprintf.o xml.o decimal.o my_strtoll10.o str_alloc.o

ranlib libmystrings.a

make[1]: Leaving directory `/usr/local/percona-data-recovery-tool-for-innodb-0.5/mysql-source/strings'

ln -fs ../mysql-source/strings/libmystrings.a lib/libmystrings.a

gcc -DHAVE_OFFSET64_T -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE_SOURCE=1 -Wall -O3 -g -I include -I mysql-source/include -I mysql-source/innobase/include -o constraints_parser constraints_parser.c lib/tables_dict.o lib/print_data.o lib/check_data.o
lib/libut.a lib/libmystrings.a

gcc -DHAVE_OFFSET64_T -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE_SOURCE=1 -Wall -O3 -g -I include -I mysql-source/include -I mysql-source/innobase/include -static -lrt -o page_parser page_parser.c lib/tables_dict.o lib/libut.a

page_parser.c: In function 鈖rocess_ibfile?

page_parser.c:249: warning: format ?lu?expects type 鈒ong unsigned int? but argument 7 has type 鈕ff_t?

page_parser.c: In function 鈕pen_ibfile?

page_parser.c:272: warning: format ?lu?expects type 鈒ong unsigned int? but argument 3 has type 鈅_dev_t?

page_parser.c:273: warning: format ?lu?expects type 鈒ong unsigned int? but argument 3 has type 鈅_ino64_t?

page_parser.c:275: warning: format ?lu?expects type 鈒ong unsigned int? but argument 3 has type 鈅_nlink_t?

page_parser.c:278: warning: format ?lu?expects type 鈒ong unsigned int? but argument 3 has type 鈅_dev_t?

page_parser.c:279: warning: format ?lu?expects type 鈒ong unsigned int? but argument 3 has type 鈅_off64_t?

page_parser.c:281: warning: format ?lu?expects type 鈒ong unsigned int? but argument 3 has type 鈅_blkcnt64_t?

page_parser.c:307: warning: format ?lu?expects type 鈒ong unsigned int? but argument 3 has type 鈕ff_t?

gcc -I include -I mysql-source/include -I mysql-source/innobase/include -o innochecksum innochecksum.c

gcc -o ibdconnect ibdconnect.c

[root@slave01 percona-data-recovery-tool-for-innodb-0.5]#

[root@slave01 percona-data-recovery-tool-for-innodb-0.5]# ls

check_data.c ibdconnect INSTALL print_data.c

constraints_parser ibdconnect.c lib split_dump.pl

constraints_parser.c include Makefile tables_dict.c

create_defs.pl incrementalupdate.c mysql-source

docs innochecksum page_parser

fetch_data.sh innochecksum.c page_parser.c

[root@slave01 percona-data-recovery-tool-for-innodb-0.5]#

到这里就可以使用percona!注意此工具对在线运行的数据库进行恢复操作,会出现数据丢失现象!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐