Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Long story short, I deleted this file thinking it was a file I had just created with a similar name for PCI compliance.

The server is hosted on Media Temple, and I am waiting for their assistance but I am not sure how long it will take.

Is there anything I can do to recover this file?

share|improve this question

closed as not constructive by mgorven, Dave M, kce, freiheit, Stefan Lasiewski Feb 11 '13 at 22:27

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

2  
You restore it from backups or etckeeper. –  mgorven Feb 11 '13 at 21:18
    
Yeah I'm not familiar with server administration (OBVIOUSLY). etckeeper sounds like a very handy tool that I will definitely look at in the future. I was keeping backups of all the files I was modifying, but the file deleted looked similar to "zz050-psa-disable-weak-ssl-ciphers.conf", which is what I had to manually create (and originally broke the server). I deleted the wrong one! –  RadGH Feb 11 '13 at 21:42

2 Answers 2

This file has probably been installed by a package. Find out by which:

rpm -qf /etc/httpd/conf.d/zz010_psa_httpd.conf

Then you can extract it from the package (e.g. by midnight commander ta least in case of RPM). If you made important, hard to repeat changes to the file then you have a backup, don't you?

share|improve this answer
    
"No such file or directory" when I use that command. The file was generated by Plesk apparently, and at the top of the file it says "# DO NOT MODIFY THIS FILE OR ANY PART OF IT. THIS CAN RESULT IN IMPROPER PLESK # FUNCTIONING OR FAILURE, CAUSE DAMAGE AND LOSS OF DATA.". Crap. –  RadGH Feb 11 '13 at 21:35
    
I am not familiar with Plesk. But I guess it doesn't replace the package management. Probably that distro doesn't use RPM but DEB. I am not familiar with apt thus I cannot tell you what the respective command is there. –  Hauke Laging Feb 11 '13 at 21:56
    
Alright, Thank you for the help. I will likely update or reinstall plesk and hope for the best. I fear our vhosts or subscriptions settings will be lost though. –  RadGH Feb 11 '13 at 21:57
1  
With a DEB packaging system, you can use dpkg --search zz010_psa_httpd.conf to find what package a file belongs to. –  freiheit Feb 11 '13 at 22:25

Luckily for me my hosting provider (Media Temple) was able to recover the file from their backups in a timely manner, fully resolving the issue. From what I've read, if you cannot restore the file yourself you must repair plesk either by reinstalling the same version or upgrading. I am still unsure what information is lost in doing so however.

The symptoms of removing the file are: Plesk, FTP, MySQL, SSH all work fine, your subscriptions are visible, site files are still intact - but you get the default CentOS server page on any domain pointing to your server.

(I guess I can't choose this as an answer just yet. If anyone has a more detailed answer with a way to restore plesk to working condition WITHOUT using a backup, I will transfer correct answer to you!)

share|improve this answer

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