I've accidentally overwritten /usr/etc with a random config file using sudo cp ~/.nzbget /usr/etc.Yes I know I should have backed it up etc, etc, etc...  Now the important stuff, I've seen extundelete, is it possible to recover the previous 'version', ie: the real /usr/etc.  /usr/etc is not on a specific partition, so is part of / which I can't really unmount.What is the best way for me to proceed?
How to restore /usr/etc
data recovery
/usr/etc is usually unused on most systems. Configurations for programs from package managers and so on are expected to go to /etc, while configurations for custom (manually compiled) programs should go to /usr/local/etc.The only time when you need /usr/etc is when you manually compile a program with --prefix=/usr, in which case it will install its configuration files under /usr/etc. If you never installed anything under this condition, then this directory never existed.If it had existed, your command wouldn't have overwritten it: it would have sent ~/.nzbget in it instead. You would therefore have /usr/etc/.nzbget. If .nzbget is a directory, then your cp command should have failed with...cp: ommiting directory '~/.nzbget'.... since it cannot copy directories unless you use the recursive switch (-R). Here again, it would have copied this directory inside /usr/etc, not overwritten it. Under no circumstances could a file replace a directory, since this would probably corrupt the file system with dummy nodes (the files which used to be under that directory would have broken paths). The kernel itself won't allow it.If you now have a /usr/etc file, then you just created it (with the contents of ~/.nzbget). Feel free to remove it (this will require root privileges if you copied your file using them) ;)