Undo sudo rm -R /*

Solution 1:

There is no undo for sudo. It's a one time root runtime privilege. To better explain, it's like deleting your Win32 folder for Windows and wondering how to get it back. A simple re-install should fix your issue. I would recommend next time using man rm to better understand what the command does.

A simple reading of any terminal command before executing them would be in your best interest for you server, so no more unnecessary functions are carried out!

This should better Illustrate my meaning:

enter image description here

Solution 2:

While there is no way to undelete the files

Your sites are still up so you can save the content from the browser. Of course if the sites are database driven then this will not help much.

But if your sites are mostly static html and they are still in memory, you can use some browser tool to save them from your browser.

There are some tools that can help with that, at the very least any browser can save complete html.

HTH