I was cleaning up on one of my older servers when I realized that there was a lot of stuff in the "sites-available" config folder that wasn't being used, and since everything I needed and rarely modified was in the "sites-enabled" folder, I ran a "rm -rf *" on the "sites-available" folder...

BAD IDEA, it happens that the files in "sites-enabled" were actually symbolic links to the ones in "sites-available", the ones I just deleted.

The good news is that I haven't applied the changes or restarted apache yet, so all my sites are still up. Is there a way to recover these file from the currently running apache process ?


Well, I know It is late, but there is a mod_info, which shall give you what you want, but it obviously has to be loaded first anyway :)


Well, you can use tool like ddrescue, because I think there is no way how to get configuration from running apache, but I can be wrong.

  • 2
    I can't comment your post, so which filesystem have you got? If it's ext4/3 than extundelete, see extundelete.sourceforge.net – Ency Dec 19 '10 at 13:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.