In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains the "installation and use of extundelete under linux", the content of the explanation 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 installation and use of extundelete under linux" bar!
I. .extundelete installation
1. Install dependency packages
# yum install e2fsprogs*-y
two。 Download and install extundelete
Http://extundelete.sourceforge.net/
Wget http://nchc.dl.sourceforge.net/project/extundelete/extundelete/0.2.4/extundelete-0.2.4.tar.bz2
# tar-jxvf extundelete-0.2.4.tar.bz2
# cd extundelete-0.2.4
#. / configure-prefix=/usr/local/extundelete
# make & & make install
3. Verify that the installation is successful
# cd / usr/local/extundelete/bin
#. / extundelete-v
-
Extundelete version 0.2.4
Libext2fs version 1.41.12
Processor is little endian.
-
4. Set environment variabl
# echo "PATH=/usr/local/extundelete/bin:$PATH" > > / etc/profile
# echo "export PATH" > > / etc/profile
# source / etc/profile
5. Upload some pictures, install packages and other files to the / data directory
# cd / data
# yum install lrzsz-y
# rz
-
Local files.
-
# ls
-
Lost+found mysql-5.6.10.tar.gz nginx.conf pic.jpg
-
6. Delete all
# rm-rf *
7. View deleted files
1)。 The disk partition needs to be unmounted before viewing
# cd ~
# umount / dev/sdb1
2)。 View Fil
Note: when a partition is mounted to a directory, the inode value of this "root" directory is 2.
In order to see all the files in the root directory, we look at this section with partition inode 2
# extundelete / dev/sdb1-- inode 2
-
.
File name | Inode number | Deleted status
. two
.. two
Lost+found 11 Deleted
Mysql-5.6.10.tar.gz 12 Deleted
Nginx.conf 13 Deleted
Pic.jpg 14 Deleted
-
Note: files marked "Deleted" are deleted files.
8. Restore the specified file
Note: deleted files will be restored to the RECOVERED_FILES directory under the current directory by default.
# extundelete-- restore-file pic.jpg / dev/sdb1
# cd RECOVERED_FILES/
# ll
-
-rw-r--r-- 1 root root 52592 August 13 07:18 pic.jpg
-
II. Recovery
9. Fully recover files on the device
# extundelete-- restore-all / dev/sdb1
# ll
-
The total dosage is 34464
-rw-r--r-- 1 root root 35174149 August 13 07:24 mysql-5.6.10.tar.gz
-rw-r--r-- 1 root root 4551 August 13 07:24 nginx.conf
-rw-r--r-- 1 root root 52592 August 13 07:18 pic.jpg
-rw-r--r-- 1 root root 52592 August 13 07:24 pic.jpg.v1
-
Note: a full restore here does not overwrite the previously restored pic.jpg file, but renames it to pic.jpg.v1
10. Deleted files after restoring the specified point in time
1)。 Specify a point in time
# date-d "Sep 4 03:09:13 2013" +% s
-
1378235353
-
2)。 Restore files after this point in time
# extundelete-restore-all-after "1378235353" / dev/sdb1
-
.
-
Note: if you want to restore the previous one, use the before parameter. The extundelete command, used in conjunction with after, is very useful for recovery, filtering out files that are too old and reducing recovery pressure.
11. Verify that the recovery is successful
# md5sum RECOVERED_FILES/mysql-5.6.10.tar.gz
-
9dcee911fb4bc7e977a6b63f4d3ffa63 RECOVERED_FILES/mysql-5.6.10.tar.gz
-
Upload the mysql installation package that was deleted by mistake
# rz
...
# md5sum mysql-5.6.10.tar.gz
-
9dcee911fb4bc7e977a6b63f4d3ffa63 mysql-5.6.10.tar.gz
-
The MD5 value is the same, and the recovery is successful.
-it's done.-
Thank you for reading, the above is the content of "installation and use of extundelete under linux". After the study of this article, I believe you have a deeper understanding of the installation and use of extundelete under linux, and the specific use 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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.