Deleted files using rm -rf /

Using TestDisk to undelete files
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
Locked
Message
Author
ragnazorg
Posts: 5
Joined: 21 Mar 2012, 12:51

Deleted files using rm -rf /

#1 Post by ragnazorg »

What happened was my server got compromised.

The hacker did rm -rf /

which resulted to my files being deleted.
I want to restore the files from a user.
Im running in debian squeeze in Xen Server. I have a Vritual drive which it is installed. Now im wondering how can I restore or check the certain files I need. Some files I need are mostly 300mb++ in size.

is it possible to restore them?

User avatar
cgrenier
Site Admin
Posts: 5432
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France
Contact:

Re: Deleted files using rm -rf /

#2 Post by cgrenier »

Try TestDisk, Advanced, Undelete but usually it only works for ext2.
If it doesn't work, run PhotoRec 6.14-WIP

Code: Select all

wget -N http://www.cgsecurity.org/testdisk-6.14-WIP.linux26.tar.bz2
tar xjf testdisk-6.14-WIP.linux26.tar.bz2
cd testdisk-6.14-WIP
sudo ./photorec_static
Good luck

Locked