Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 01-02-2013, 10:45 PM   #1
LQ Newbie
Registered: Jan 2013
Location: noida
Posts: 1

Rep: Reputation: Disabled
Lightbulb datafile recovery in Oracle on centos

i have accidentally deleted a datafile using rm command can i recover it using any linux utility and commands. I don't want to restore from backup??
Old 01-03-2013, 07:29 AM   #2
Registered: Aug 2002
Posts: 14,754

Rep: Reputation: 1476Reputation: 1476Reputation: 1476Reputation: 1476Reputation: 1476Reputation: 1476Reputation: 1476Reputation: 1476Reputation: 1476Reputation: 1476
Welcome to LinuxQuestions.

Why do you not want to restore from backup?

Since Linux is multiuser and multitasking operating system other users/process can overwrite deleted file disk space. There is no guarantee that any particular file will be able to be undeleted. If desired you can create a backup of the partition dd bs=4M if=/dev/partition of=partition.backup as a precautionary measure to save the deleted file from being overwritten. As explained in the link below if oracle is still has the data file opened it might be possible to recover like:

lsof|grep "/path/to/file"

Will output something like this:
progname 5559 user 22r REG 8,5 1282410 1294349 /path/to/file

Take the 2nd column 5559 and fouth number 22 and use the copy command:
cp /proc/5559/fd/22 restored.file

I recommend photorec and testdisk.

And lots more information can be found by searching the web.


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
centos 4 superblock recovery kiran.ursal Linux - Newbie 2 03-02-2012 07:31 PM
Oracle error gets changed during data recovery navin_brd Linux - Server 1 08-29-2010 07:12 AM
[SOLVED] Move MySql datafile to different location ethereal1m Slackware 2 08-28-2010 12:01 AM
How to corrupt the datafile in Oracle Ejdaha Linux - Newbie 2 03-01-2010 07:15 AM
Centos - Recovery Commands andrew_ww Linux - Newbie 1 04-28-2009 04:51 PM

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

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