LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


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

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


hi,
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
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,680

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


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:00 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
Open Source Consulting | Domain Registration