I was a dumbass and let a random guy SSH into my server machine runniing Ubuntu Server 18.04, and he was a jerk and sus "sudo rm -rf /*" which wiped everything from the box.
Is there a way to restore it?
Is there a way to restore it?
I was a dumbass and let a random guy SSH into my server machine runniing Ubuntu Server 18.04, and he was a jerk and sus "sudo rm -rf /*" which wiped everything from the box.
Is there a way to restore it?
I do not have any backups. I was just thinking that Windows has a "system repair" feature, I was thinking Ubuntu might have one too, but not too sure.Did you have any backups? If not then there is nothing that can be done other than reset the os on the system. Feel free to contact me Resolv#0001 if you need any help
Only way to fix a server after that, is to truly install a secondary drive, move all files over once the second drive has an operating system and then wiping the first.I do not have any backups. I was just thinking that Windows has a "system repair" feature, I was thinking Ubuntu might have one too, but not too sure.
There would be no files on the main drive, it got clearedOnly way to fix a server after that, is to truly install a secondary drive, move all files over once the second drive has an operating system and then wiping the first.
Thats what you would think at first, its what lots of people think. However, this isn't ALWAYS true, sometimes it is sometimes not. If you're lucky, you can attempt to go into rescue mode and see if there's anything left on the drive, else.. Goodbye data, and a bad way to learn not to trust anyone with SSH. Not a good chance you can recover it thoughThere would be no files on the main drive, it got cleared
I've seen this done on 10+ machines and never saw a single file get recovered, even after a hosting company spent $500+ and a week trying to use the linux file restoration system. The only way IMO is to send it to a drive specialist who can extract the files before they're written overThats what you would think at first, its what lots of people think. However, this isn't ALWAYS true, sometimes it is sometimes not. If you're lucky, you can attempt to go into rescue mode and see if there's anything left on the drive, else.. Goodbye data, and a bad way to learn not to trust anyone with SSH. Not a good chance you can recover it though
If you would like me to help you get up and running again, give me a msg on discord @Mark#8901
In all my recoveries I have done, which a good 75%-85% have been from "rm -rf /", they left enough data that I could get their entire node back up within a few hours (the sql being the hardest to recover). You may be able to recover the "/boot" if you are lucky, which a good percentage of recoveries you wouldn't be able to do.There would be no files on the main drive, it got cleared
It is also a good note, that most companies when able to spend $500+ on just a restoration service should be able to fork a bit of that towards a proper backup solution, rather it be NAS drives or simple Restore files. Something as simple as that can save a company hundreds if not thousands in repair costs and lost time/data.I've seen this done on 10+ machines and never saw a single file get recovered, even after a hosting company spent $500+ and a week trying to use the linux file restoration system. The only way IMO is to send it to a drive specialist who can extract the files before they're written over
Yeah I didn't say it's impossible but DO NOT EVER LET A NOOB DO IT. EVER! A noob can fuck it up and make it unrecoverable. If you know what you're doing then yeah you can recover the data. I also agree on the last part. Companies should be forward thinking and should pay for backup solutions. These solutions save money compared to spending money on data recoveryIn all my recoveries I have done, which a good 75%-85% have been from "rm -rf /", they left enough data that I could get their entire node back up within a few hours (the sql being the hardest to recover). You may be able to recover the "/boot" if you are lucky, which a good percentage of recoveries you wouldn't be able to do.
It is also a good note, that most companies when able to spend $500+ on just a restoration service should be able to fork a bit of that towards a proper backup solution, rather it be NAS drives or simple Restore files. Something as simple as that can save a company hundreds if not thousands in repair costs and lost time/data.
I agree, I've done it some times via the platforms: extundelete and photorec the last few times I've used them I got 99% files back. That isn't to say it will give you the same resultYeah I didn't say it's impossible but DO NOT EVER LET A NOOB DO IT. EVER! A noob can fuck it up and make it unrecoverable. If you know what you're doing then yeah you can recover the data. I also agree on the last part. Companies should be forward thinking and should pay for backup solutions. These solutions save money compared to spending money on data recovery
I think this is a perfect example of why you need to use a qualified system admin, with good reputation and is clearly knowledgeable. Almost cried when I read "let a random guy SSH"I was a dumbass and let a random guy SSH into my server machine runniing Ubuntu Server 18.04, and he was a jerk and sus "sudo rm -rf /*" which wiped everything from the box.
Is there a way to restore it?
Agreed, I died inside.I think this is a perfect example of why you need to use a qualified system admin, with good reputation and is clearly knowledgeable. Almost cried when I read "let a random guy SSH"![]()
