Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of successfully restoring mistakenly deleted Files under Linux EXT3 File system

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains the "Linux EXT3 file system to successfully restore mistakenly deleted files under the method", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn the "Linux EXT3 file system to successfully restore mistakenly deleted files under the method" it!

Environment: / dev/sdb1 is a data partition / data0,EXT3 file system under CentOS 5.3 x86 / 64.

Antecedent: / data0/tcsql/cankao/phpcws-1.5.0/httpcws.cpp file was deleted by mistake. Because I forgot to back up the httpcws.cpp file, the redevelopment workload is heavy, so there is only one way to restore the file.

The debugfs command is fine for EXT2 partitions, but it doesn't help for EXT3 partitions. A piece of open source software that I stumbled upon solved my great favor. The software can be downloaded from:

Http://code.google.com/p/ext3grep/

1. Install the ext3grep software first:

Wget http://ext3grep.googlecode.com/files/ext3grep-0.10.1.tar.gz

Tar zxvf ext3grep-0.10.1.tar.gz

Cd ext3grep-0.10.1

. / configure

Make

Make install

2. Umount / data0 partition:

Umount / data0

If you prompt busy, first kill the process that is using this directory, and then umount:

Fuser-k / data0

Umount / data0

3. Query all Inode (execution takes a few minutes to more than 10 minutes):

Ext3grep / dev/sdb1-ls-inode 2

4. Search Inode step by step to see if you can find the httpcws.cpp file (this step can also be omitted):

5. Restore / data0/tcsql/cankao/phpcws-1.5.0/httpcws.cpp file:

Ext3grep / dev/sdb1-- restore-file tcsql/cankao/ phpcws-1.5.0/httpcws.cpp

"if you are prompted for the following information, the restore is successful:"

Restoring tcsql/cankao/phpcws-1.5.0/httpcws.cpp

At this point, a folder called RESTORED_FILES is automatically generated under the current directory where the ext3grep command is executed, and the tcsql/cankao/phpcws-1.5.0/httpcws.cpp under the folder is the recovered file. Check it out, and it's the same as before it was deleted, and it's done.

6. Re-mount / data0 partition:

Mount / dev/sdb1 / data0

Thank you for your reading, the above is the "Linux EXT3 file system to successfully restore mistakenly deleted files under the method" of the content, after the study of this article, I believe you on the Linux EXT3 file system to successfully restore mistakenly deleted files under the method of this problem has a deeper understanding, the specific use of the situation also needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report