Simulate the inode node occupies a small experiment
Step 1: Add a new experimental hard disk and create a new partition and
format it as ext4
Step 2: Create an empty test666 directory in the root directory and mount it
Step 3: Switch to the mount directory and edit the code as shown in the figure
The fourth step: df -i and df-Th view the experimental situation.
To restore the directory, use delete rm -rf /test666/*
EXT3 file recovery
The first step is to create a new hard disk, create a new partition /dev/sdb1 and
create an empty directory test666 in the root directory.
Format mkfs.exte /dev/sdb1. The
second step is to install the environment software
yum -y install e2fsprogs-devel e2fsprogs-libs
Step 3:
Drag extundelete-0.2.4.tar.bz2 to the opt directory.
Step 4: Unzip tar jxvf extundelete-0.2.4.tar.bz2 -C /test666
Step Five: Switch to cd extundelete-0.2.4
execute ./configure --prefix = / usr / local / extundelete && make && make install
Step Six: View
/ usr / local / extundelete / bin / extundelete whether there is a
seventh Step: Create a soft link
ln -s /usr/local/extundelete/bin/extundelete /usr/bin
Step 8: Create 4 files in the mount directory and test the experiment
. Step 9: Delete some files.
Step 10: Enter the command
extundelete /dev/sdb2 --inode 2 to check if the deleted file exists.
Step 11: Restore the file.
extundelete /dev/sdb1 --restore-all
xfs file backup and recovery
Step 1: Create a new hard drive, the new partition, format type xfs
Step 2: Create an empty directory in the root directory test777
the / etc / passwd / etc / shadow copy to test777
Step 3: Check xsfsdump tool is installed
on Step 4: Enter the command to back up the file
xfsdump -f /opt/dump_sdc1 /dev/sdc1 -L dump_sdc1 -M sdc1
and delete the file in the test777 directory to simulate file loss
Step 5: To restore the file, enter the command
xfsrestore -f /opt/dump_sdc1 /test777
and see if it is restored