Ran a MV command that wiped my /home/ directory! Please help!

mofolo

Member
Jan 26, 2012
18
0
51
cPanel Access Level
Website Owner
I ran (stupidly) this command:

mv ncdu/ /home/*

And it caused me to remove all my Apache directories in my /home/ folder, except virtfs (cPanel).

As you can imagine, It's knocked out my websites.

I've noticed that /virtfs/ still have all the files of the websites and I have daily cPanel backups stored in my /home2/ directory. I tried to restore, but i've also managed to knock out my WHM login also!

How do I restore the /home directory to how it should be? Is there a cPanel script I can run or do I have to create hardlinks manually?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,227
463
Hello :)

Please do not attempt to restore content from the VirtFS directory. A bind mount is a transparent link between two places on the file system. For example, if a user views the contents of /home/virtfs/username/usr/bin, the user actually sees the contents of /usr/bin.

I suggest terminating the accounts, ensuring your /home directory is in it's original state, and then restoring the accounts from backup.

Thank you.