LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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, 11: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, 08:29 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 12,154

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
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


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 08:31 PM
Oracle error gets changed during data recovery navin_brd Linux - Server 1 08-29-2010 08:12 AM
[SOLVED] Move MySql datafile to different location ethereal1m Slackware 2 08-28-2010 01:01 AM
How to corrupt the datafile in Oracle Ejdaha Linux - Newbie 2 03-01-2010 08:15 AM
Centos - Recovery Commands andrew_ww Linux - Newbie 1 04-28-2009 05:51 PM


All times are GMT -5. The time now is 06:20 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration