Linux Centos7 xfs file accidentally deleted, how to do - quickly recover xfs file Teaching

Linux Centos7 xfs file accidentally deleted, how to do - quickly recover xfs file Teaching

A .xfs file recovery

xfs types of files can be used with xfsrestore xfsdump tools for backup and recovery. If the system is not installed
xfsdump xfsrestore tool and can be installed by yum install -y xfsdump command. xfsdump according to
backup a file system inode xfs order. xfsdump two backup levels: 0 indicates a full backup; 1-9 represents
an incremental backup. xfsdump backup level 0 by default. xfsdump command format is: xfsdump -f backup storage
location or device files to the backup path.

Linux Centos7 xfs file accidentally deleted, how to do - quickly recover xfs file TeachingLinux Centos7 xfs file accidentally deleted, how to do - quickly recover xfs file Teaching

Let's experiment a bit xfs file recovery

1. Let's add a disk and let it effectively

Linux Centos7 xfs file accidentally deleted, how to do - quickly recover xfs file TeachingLinux Centos7 xfs file accidentally deleted, how to do - quickly recover xfs file Teaching

2. Create a primary partition

Linux Centos7 xfs file accidentally deleted, how to do - quickly recover xfs file Teaching

3. Format, create a mount point, mount

Linux Centos7 xfs file accidentally deleted, how to do - quickly recover xfs file Teaching
Linux Centos7 xfs file accidentally deleted, how to do - quickly recover xfs file Teaching

4. Create data files and directories in the mount point below

Linux Centos7 xfs file accidentally deleted, how to do - quickly recover xfs file Teaching

The tree structure to view files

Linux Centos7 xfs file accidentally deleted, how to do - quickly recover xfs file Teaching

6. Use xfsdump -f command to opt from the following backup directory name, the device is sdb1

Linux Centos7 xfs file accidentally deleted, how to do - quickly recover xfs file TeachingLinux Centos7 xfs file accidentally deleted, how to do - quickly recover xfs file Teaching

7. Delete all the data files, use xfsrestore -f command to restore

Linux Centos7 xfs file accidentally deleted, how to do - quickly recover xfs file Teaching

8. Review the recovery

Linux Centos7 xfs file accidentally deleted, how to do - quickly recover xfs file Teaching

Guess you like

Origin blog.51cto.com/14449524/2433036