Linux Restore mistakenly delete files
Environment requirements: Create a new file system in the virtual machine, creating several files in the file system, the simulation files are mistakenly deleted in the recovery experiment.
Compiling and installing the Extundelete package
First Use Yum Warehouse Installation Dependency Packages E2fsprogs-libs , E2fsprogs-devel ( Yum Warehouse production is described in the previous article, here no longer the fat complaint)
Mount Windows System shared folder, view package (mount operation see GO)
Tar Unzip Extundelete Source Code Package
before the first compilation of the installation, you have to confirm the compilation environment, with Yum Warehouse Installation Environment Package GCC , gcc-c++, make
then Enter Extundelete the folder after the package is unzipped, the configuration is compiled and installed
Simulate accidental deletion and perform recovery operations
Add a new hard disk to the virtual machine and restart the virtual machine for it to take effect, then create the partition and mount the specified mount point after formatting
Enter the mount point and create several files inside
Simulate a mistake delete operation
Immediately after the accidental deletion, exit the mount point and unmount the file system.
Then enter the Extundelete/dev/dd1–inode 2 command to view the file status in the file system.
Enter the Extundelete/dev/sdd1–-restore-all command to restore everything under the file system
The recovered files will be in a recovered_files subdirectory that appears in the current directory.
Experiment completed
Linux Restore mistakenly delete files