Linux--Node Inode is full | EXT3 type file recovery | XFS file backup practical operation small experiment | super detailed

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
Insert picture description here

Step 3: Switch to the mount directory and edit the code as shown in the figure

Insert picture description here
The fourth step: df -i and df-Th view the experimental situation.
Insert picture description here
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
Insert picture description here
second step is to install the environment software
yum -y install e2fsprogs-devel e2fsprogs-libs
Insert picture description here
Step 3:
Drag extundelete-0.2.4.tar.bz2 to the opt directory.
Insert picture description here
Step 4: Unzip tar jxvf extundelete-0.2.4.tar.bz2 -C /test666
Insert picture description here

Step Five: Switch to cd extundelete-0.2.4
execute ./configure --prefix = / usr / local / extundelete && make && make install
Insert picture description here
Step Six: View
/ usr / local / extundelete / bin / extundelete whether there is a
Insert picture description here
seventh Step: Create a soft link
ln -s /usr/local/extundelete/bin/extundelete /usr/bin

Insert picture description here
Step 8: Create 4 files in the mount directory and test the experiment
Insert picture description here
. Step 9: Delete some files.
Insert picture description here
Step 10: Enter the command
extundelete /dev/sdb2 --inode 2 to check if the deleted file exists.
Insert picture description here
Step 11: Restore the file.

extundelete /dev/sdb1 --restore-all

Insert picture description here

xfs file backup and recovery

Step 1: Create a new hard drive, the new partition, format type xfs
Insert picture description here
Step 2: Create an empty directory in the root directory test777
the / etc / passwd / etc / shadow copy to test777
Insert picture description here
Step 3: Check xsfsdump tool is installed
Insert picture description here
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
Insert picture description here
Step 5: To restore the file, enter the command
xfsrestore -f /opt/dump_sdc1 /test777
and see if it is restored
Insert picture description here

Guess you like

Origin blog.csdn.net/Dark_Tk/article/details/113578250