0

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:  

1 Answers1

1

By default CentOS 7 uses the xfs filesystem. The utility debugfs will not work for filesystems other than ext2/ext3/ext4

If the file is still opened by a process you can restore the file using the open filedescriptor:

lsof |egrep "COMMAND|keystone.conf.disabled"
cp /proc/<pid>/fd/### /var/tmp/keystone.conf.disabled
Lambert
  • 12,680