• 7
name
name Punditsdkoslkdosdkoskdo

rm -rf on vhosts directory, what should I do?

I was tired and unfortunately I did:

rm -rf * /var/www/vhosts repertory

on my CentOS 6.3 running with Parallel Plesk.

I lost many websites, but worst: I've lost chroot, default, fs and fs-passwd.

What were these folders? What did they do? What should I do now...?

I have backups, but only for my websites. I miss every file and folder that were in the vhosts directory (chroot, default, fs and fs-passwd).

      • 1
    • not sure about this, maybe others can comment/add more detail, but: would it be possible to use data carving to recover the deleted files? I'll do some more research for my own sake on this as well.
    • ArchWiki has a page about some recovery tools, including some that use data carving to restore deleted files/directories. It might be relevant to include your FS-type in your question.

My content hoster helped me and found a solution, which might not work at 100% but 90% (100% is the total reload of the server).

First, since I had recreated a customized /vhost/ directory with my backed up contents in there (it would not be your case), I deleted /vhosts/.

Second, I ran this from SSH: usr/local/psa/bootstrapper/pp11.0.9-bootstrapper/bootstrapper.sh repair

My hoster said:

That utility should at least make Apache function normally again, but there will be some oddities that can't be avoided. Plesk will sometimes be able to recover the metadata and recreate them without content.

So, I recreated the subscriptions/webspaces on Plesk. Then I used the backups to restore the subscriptions/webspaces to their original condition.

You may sometimes find when recreating the subscription/webspace that the user account already exists. This is because the bootstrap repair didn't leave a clean slate in Plesk. You'll need to edit the psa database and look for the username under the sys_users table and delete it. If Plesk still complains about the user, delete the actual account from SSH, he added.

  • 0
Reply Report

Warm tip !!!

This article is reproduced from Stack Exchange / Stack Overflow, please click

Trending Tags