LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   rm -rf / (https://www.linuxquestions.org/questions/linux-newbie-8/rm-rf-935254/)

mainstream 03-19-2012 06:42 AM

rm -rf /
 
Hello all,

I was asking for coding help, in a script to convert my mp3 names to my looking.

I asked help in several forums (can't recall which one) to extend my script's cababilities.

However, someone added rm -rf / in the script, so i lost everything... I know really stupid but it's already happened.

What is the best way to retrieve my files without overwriting my EXT4 partition. I'm booted in Windows atm.

Thanks for all your help :-)

onebuck 03-19-2012 08:14 AM

Member response
 
Hi,

Restore from backup!

Oh! You do not have a backup then look at: Tools, Recovery, Diagnostic, Emergency.

You will find UBCD Ultimate Boot CD. UBCD allows users to run floppy-based diagnostic tools from most CDROM drives on Intel-compatible machines, no operating system required. The cd includes many diagnostic utilities plus you can use PhotoRec, Digital Picture & File Recovery. 'PhotoRec is file data recovery software designed to recover lost files including video, documents and archives from Hard Disks and CDRom and lost pictures (thus, its 'Photo Recovery' name) from digital camera memory. PhotoRec ignores the filesystem and goes after the underlying data, so it will still work even if your media's filesystem has been severely damaged or re-formatted' After Using PhotoRec & PhotoRec Wiki are useful.

TestDisk is another tool on UBCD. This tool is used to check and undelete partition, supports reiserfs, ntfs, fat32, ext2/3 and others.

TestDisk Wikipedia, wiki and Data Recovery using TestDisk are useful links.

The above links and others can be found at 'Slackware-Links'. More than just SlackwareŽ links!

mainstream 03-20-2012 05:04 AM

Ok thank you. I already tried Photorec and Testdisk, but the results were a bit disappointing.

My backups (on a mounted NTFS partition) also got deleted...
I occasionally tarred my home directory to that dir.

I am now trying to retrieve my backups with getdataback ntfs :)

onebuck 03-20-2012 07:02 AM

Member response
 
Hi,

As you have found out, backups to the same physical drive is not a good practice. You really do not need to backup the system entirely. Just configuration and your important data. Since the system itself can be rebuilt and then use the saved configuration to recover to a working system. Sure one can do a mirror image but that too should be placed else where.

Any time you have issues then work should be done on a copy of the problem system. That way the original will remain intact. Any writes to the problem disk will just compound problems.


All times are GMT -5. The time now is 01:32 AM.