MySQL data file Delete, OS level recovery file

Source: Internet
Author: User

In the case of what backup, the data file was deleted for recovery
Some of the restrictive conditions

1. Data blocks that need to be recovered should not be used

2. The file system itself has not been corrupted
Using the tool ext3grep,http://code.google.com/p/ext3grep/
Installation
./configure
Make
Make install


Mount
Ls-id file system directory where data files are stored--view Inode
Umount file system directory where data files are stored
EXT3GREP/DEV/SDB1--ls--inode 2
EXT3GREP/DEV/SDB1--ls--inode 3
EXT3GREP/DEV/SDB1--ls--inode 4


EXT3GREP/DEV/SDB1--restore-inode 2--run to an empty directory
mv./RESTORED_FILES/INODE.2 T3. MYI


EXT3GREP/DEV/SDB1--restore-inode 3
mv./restored_files/inode.3 T3. MYD


EXT3GREP/DEV/SDB1--restore-inode 4
mv./restored_files/inode.4 T3.frm


CP t3*/HOME/MYSQL/DB1
Chown Mysql:mysql t3*






Extundelete tools like Ext3grep can restore EXT4 type
EXTUNDELETE/DEV/SDB1--inode 2
EXTUNDELETE/DEV/SDB1--restore-inode 2

MySQL data file Delete, OS level recovery file

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.