LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-19-2012, 07:42 AM   #1
mainstream
Member
 
Registered: Oct 2010
Location: localhost
Distribution: Ubuntu / Linux Mint
Posts: 61

Rep: Reputation: 0
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 :-)
 
Old 03-19-2012, 09:14 AM   #2
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,541
Blog Entries: 23

Rep: Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943
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!
 
1 members found this post helpful.
Old 03-20-2012, 06:04 AM   #3
mainstream
Member
 
Registered: Oct 2010
Location: localhost
Distribution: Ubuntu / Linux Mint
Posts: 61

Original Poster
Rep: Reputation: 0
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
 
Old 03-20-2012, 08:02 AM   #4
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,541
Blog Entries: 23

Rep: Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off




All times are GMT -5. The time now is 01:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration