是否有可能获得目前正在运行的configurationdhcpd? 我无意中删除了dhcpd.conf,但尚未重新启动服务。 目前正在为我的testing计算机分配正确的IP,所以它必须在内存中有正确的configuration。
不幸的是我没有备份(我知道,我知道),我可以从中恢复,但我希望我可以以某种方式从内存转储configuration。
我已经检查过租约文件,但只包含了我期望获得的一小部分。
任何帮助将非常感激。
编辑1 🙁对于Michal)
[root@router2 log]# ll /proc/26125/fd/ total 0 lrwx------. 1 root root 64 Jun 17 20:13 0 -> /dev/null lrwx------. 1 root root 64 Jun 17 20:13 1 -> /dev/null lrwx------. 1 root root 64 Jun 17 20:13 2 -> /dev/null lrwx------. 1 root root 64 Jun 17 20:13 3 -> socket:[100465655] lrwx------. 1 root root 64 Jun 17 20:13 4 -> socket:[100465662] lrwx------. 1 root root 64 Jun 17 20:13 5 -> socket:[100465666] l-wx------. 1 root root 64 Jun 17 20:13 6 -> /var/lib/dhcpd/dhcpd.leases lrwx------. 1 root root 64 Jun 17 20:13 7 -> socket:[100465667]
和
[root@router2 log]# cp /proc/26125/fd/3 /dhcpd3.txt cp: cannot open '/proc/26125/fd/3' for reading: No such device or address
cp /proc/PID/fd/3 /tmp/recovered_file
来源: https : //superuser.com/questions/283102/how-to-recover-deleted-file-if-is-is-still-opened-by-some -处理
如果您在Ext3
/ Ext4
文件系统上有dhcpd.conf
文件,您可以尝试: extundelete --restore-file /path/name.conf /dev/sdXY
来源: https : extundelete --restore-file /path/name.conf /dev/sdXY
内存转储: gcore $pid