Case: Oracle database File Removal extundelete tool mining recover deleted database files

Source: Internet
Author: User


Oracle database file deleted, restore Linux deleted data file via Extundelete


There's a friend's client in the group today. RM dropped the data file, and then discussed the use of extundelete to recover, salvage some of the data files are not overwritten. The official address of the software: http://extundelete.sourceforge.net/


1. Installing the Extundelete tool
[[email protected] tmp]# bunzip2 extundelete-0.2.0.tar.bz2
[[email protected] tmp]# tar xvf extundelete-0.2.0.tar
extundelete-0.2.0/
extundelete-0.2.0/README
extundelete-0.2.0/acinclude.m4
extundelete-0.2.0/configure.ac
extundelete-0.2.0/aclocal.m4
extundelete-0.2.0/Makefile.am
extundelete-0.2.0/Makefile.in
extundelete-0.2.0/config.h.in
extundelete-0.2.0/configure
extundelete-0.2.0/compile
extundelete-0.2.0/depcomp
extundelete-0.2.0/install-sh
extundelete-0.2.0/missing
extundelete-0.2.0/LICENSE
extundelete-0.2.0/autogen.sh
extundelete-0.2.0/src/
extundelete-0.2.0/src/Makefile.am
extundelete-0.2.0/src/Makefile.in
extundelete-0.2.0/src/extundelete.cc
extundelete-0.2.0/src/block.c
extundelete-0.2.0/src/insertionops.cc
extundelete-0.2.0/src/block.h
extundelete-0.2.0/src/extundelete.h
extundelete-0.2.0/src/extundelete-priv.h
extundelete-0.2.0/src/jfs_compat.h
extundelete-0.2.0/src/kernel-jbd.h
[[email protected] tmp]# cd extundelete-0.2.0
[[email protected] extundelete-0.2.0]#  ./configure
Configuring extundelete 0.2.0
Writing generated files to disk
[[email protected] extundelete-0.2.0]# make && make install
make -s all-recursive
Making all in src
Making install in src
  /usr/bin/install -c ‘extundelete‘ ‘/usr/local/bin/extundelete‘
2. Extundelete Restore Oracle Database Data file Operations Command

--umount or read only partition
  umount / dev / partition
  mount -o remount, ro / dev / partition

--Recover files
xtundelete / dev / partition --restore-all
extundelete / dev / partition --restore-directory / backup / gnutool-delete
extundelete / dev / partition --restore-files / etc / passwd


Test recovery


-Directory-based recovery
[[email protected] tmp] #extundelete / dev / sdb1 --restore-directory / u01 / xifenfei
Loading filesystem metadata ... 160 groups loaded.
Loading journal descriptors ... 23 descriptors loaded.
Writing output to directory RECOVERED_FILES /
Failed to restore file / u01 / xifenfei
Could not find correct inode number past inode 2.
[[email protected] tmp] # cd RECOVERED_FILES /
[[email protected] RECOVERED_FILES] # ll
total 0
-Unsuccessful

-Disk-based recovery
[[email protected] RECOVERED_FILES] #extundelete / dev / sdb1 --restore-all
Loading filesystem metadata ... 160 groups loaded.
Loading journal descriptors ... 23 descriptors loaded.
Writing output to directory RECOVERED_FILES /
Searching for recoverable inodes in directory / ...
4 recoverable inodes found.
Looking through the directory structure for deleted files ...
Failed to restore inode 1966081 to file RECOVERED_FILES / xifenfei: Inode does not correspond to a regular file.
Restored inode 1966082 to file RECOVERED_FILES / xifenfei / xff.txt
Failed to restore inode 1966083 to file RECOVERED_FILES / xifenfei / xff: Inode does not correspond to a regular file.
Restored inode 1966084 to file RECOVERED_FILES / xifenfei / xff / xff.txt132
0 recoverable inodes still lost.
[[email protected] RECOVERED_FILES] # ll
total 4
drwxr-xr-x 3 root root 4096 Aug 31 21:36 RECOVERED_FILES
[[email protected] RECOVERED_FILES] # cd RECOVERED_FILES /
[[email protected] RECOVERED_FILES] # ll
total 4
drwxr-xr-x 3 root root 4096 Aug 31 21:36 xifenfei
[[email protected] RECOVERED_FILES] # cd xifenfei /
[[email protected] xifenfei] # ll
total 20
drwxr-xr-x 2 root root 4096 Aug 31 21:36 xff
-rw-r--r-- 1 root root 13231 Aug 31 21:36 xff.txt
[[email protected] xifenfei] # cd xff
[[email protected] xff] # ll
total 16
-rw-r--r-- 1 root root 13231 Aug 31 21:36 xff.txt132
--Successful recovery

--File-based recovery
[[email protected] xff] # extundelete / dev / sdb1 --restore-files /u01/xifenfei/xff.txt
Loading filesystem metadata ... 160 groups loaded.
Loading journal descriptors ... 23 descriptors loaded.
Writing output to directory RECOVERED_FILES /
[[email protected] xff] # cd RECOVERED_FILES /
[[email protected] RECOVERED_FILES] # ll
total 0
-Unsuccessful 

The above experiment proves that Extundelete still has great incompleteness, the recovery function based on the whole disk is more powerful, and the recovery based on the directory and file is not strong enough. However, the software often has the function of fire fighting, especially when the staff of the cone removed some files from the database.






--------------------------------------ORACLE-DBA----------------------------------------



The most authoritative and professional Oracle Case Resource Summary case: Oracle database File Removal extundelete tool mining recover deleted database files



Original URL: http://www.oracleplus.net/arch/oracle-20160526-229.html


Oracle Research Center Key Words:Oracle database file removal How to recover extundelete tool mining recover deleted database files


Case: Oracle database File Removal extundelete tool mining recover deleted database files


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.