If, for example, you spend some time working on a named.conf, and then by mistake clear it and save it (thanks to vi), is there a saved copy of the named.conf in the running instance that I could grab?
If, for example, you spend some time working on a named.conf, and then by mistake clear it and save it (thanks to vi), is there a saved copy of the named.conf in the running instance that I could grab?
found it!
/var/named/1 contains the running config!
Since I'm not high-enough to make comments, I'll address my question in my answer, if that's ok.
First, is your instance of
vi
still running? You can undo, or check if the .swp file exists, it might contain your buffer.Also, you can definitely dump the processes memory and extract the data you're looking for that way, but this would be significantly more tedious.
You can use LSOF if your process is still running
IBM example, aimed at AIX but the process should be similar for most implementations. Then an example from Linux.com
Whilst you've already accepted an answer to this question, I'm submitting this response as it may be useful to others that can't rely on the
/var/named/1
file existing or if they've removed a file not related to named