简体   繁体   中英

How to recover the deleted file from linux system?

I am using centos7 locally. Mistaken I deleted text file(keystone.conf.disabled) using rm, from /etc/httpd/conf.d directory, How to recover this file. This file is very important to me. Please help me..

I try to but in vain It is giving message Filesystem n

[vagrant@localhost conf.d]$ debugfs -w /dev/mapper/wks01-root
debugfs 1.42.9 (28-Dec-2013)
/dev/mapper/wks01-root: No such file or directory while opening filesystem
debugfs:  lsdel
lsdel: Filesystem not open
debugfs:  

I try also using as root user

[vagrant@localhost conf.d]$ su
Password: 
[root@localhost conf.d]# debugfs -w /dev/mapper/wks01-root
debugfs 1.42.9 (28-Dec-2013)
/dev/mapper/wks01-root: No such file or directory while opening filesystem
debugfs:  lsdel
lsdel: Filesystem not open
debugfs:  

Make sure the system is remounted read-only to prevent the released diskspace from being overwritten and try extundelete if you're on ext3/4 .

For the future, etckeeper might be useful (makes a git repo out of etc and commits on installs that change /etc/ )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM