slider

How to recover some needed pages

  1. Backup and Data Recovery for MySQL
  2. How to recover some needed pages
0
0

I use our software to recover corrupted InnoDB database.

I use stream_parser both for ibdata1 and dd copy of /dev/sdaN.

when I restore the tables I have warnings like

— #####CannotOpen_./0000000000002021.page;
— print_field_value_with_external(): open(): No such file or directory

When I use the text search, I can find the contain of nessecary fields. But in result of stream_parser it’s absent.

Can you help me.

  • You must to post comments
0
0

If table has BLOB, TEXT or similar large fields some values may be stored in external pages. The external pages are normally in directory FIL_PAGE_TYPE_BLOB in the stream_parser result:

$ ll pages-actor.ibd/
total 0
drwxr-xr-x 4 aleks staff 136B Nov 9 19:43 ./
drwxr-xr-x 14 aleks staff 476B Nov 9 21:14 ../
drwxr-xr-x 4 aleks staff 136B Nov 9 19:43 FIL_PAGE_INDEX/
drwxr-xr-x 2 aleks staff 68B Nov 9 19:43 FIL_PAGE_TYPE_BLOB/
$ ll pages-actor.ibd/FIL_PAGE_TYPE_BLOB/
total 96
drwxr-xr-x 5 aleks staff 170B Nov 9 07:21 ./
drwxr-xr-x 4 aleks staff 136B Nov 9 07:21 ../
-rw-r--r-- 1 aleks staff 16K Nov 9 07:21 0000000000000052.page
-rw-r--r-- 1 aleks staff 16K Nov 9 07:21 0000000000000053.page
-rw-r--r-- 1 aleks staff 16K Nov 9 07:21 0000000000000054.page

To let c_parser know where to find external pages use -b option.

c_parser -5f pages-actor.ibd/pages-actor.ibd/FIL_PAGE_INDEX/0000000000000015.page -b pages-actor.ibd/FIL_PAGE_TYPE_BLOB/

In some rare cases pages-actor.ibd/FIL_PAGE_TYPE_BLOB/ is empty because on some MySQL versions external pages have type FIL_PAGE_INDEX. This is a kind of unexpected behaviour, but there is a workaround. See post How to handle wrong page type in external pages for details.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.