标签云
asm恢复 bbed bootstrap$ dul kcbzib_kcrsds_1 kccpb_sanity_check_2 kcratr_nab_less_than_odr MySQL恢复 obet ORA-00312 ORA-00704 ORA-00742 ORA-01110 ORA-01200 ORA-01555 ORA-01578 ORA-01595 ORA-600 2662 ORA-600 2663 ORA-600 3020 ORA-600 4000 ORA-600 4137 ORA-600 4193 ORA-600 4194 ORA-600 16703 ORA-600 kcbzib_kcrsds_1 ORA-600 KCLCHKBLK_4 ORA-600 kcratr_nab_less_than_odr ORA-15042 ORA-15196 ORACLE 12C oracle dul ORACLE PATCH Oracle Recovery Tools oracle加密恢复 oracle勒索 oracle勒索恢复 oracle异常恢复 ORACLE恢复 Oracle 恢复 ORACLE数据库恢复 oracle碎片 OSD-04016 YOUR FILES ARE ENCRYPTED 比特币加密文章分类
- MongoDB (1)
- MongoDB恢复 (1)
- Others (2)
- 中间件 (2)
- WebLogic (2)
- 操作系统 (112)
- 数据库 (1,884)
- DB2 (22)
- MySQL (82)
- Oracle (1,709)
- Data Guard (53)
- EXADATA (8)
- GoldenGate (24)
- ORA-xxxxx (168)
- ORACLE 12C (72)
- ORACLE 18C (6)
- ORACLE 19C (15)
- ORACLE 21C (3)
- Oracle 23ai (8)
- Oracle ASM (73)
- Oracle Bug (8)
- Oracle RAC (56)
- Oracle 安全 (6)
- Oracle 开发 (28)
- Oracle 监听 (29)
- Oracle备份恢复 (662)
- Oracle安装升级 (108)
- Oracle性能优化 (62)
- 专题索引 (5)
- 勒索恢复 (91)
- PostgreSQL (37)
- pdu工具 (7)
- PostgreSQL恢复 (13)
- SQL Server (34)
- SQL Server恢复 (14)
- TimesTen (7)
- 达梦数据库 (5)
- 达梦恢复 (3)
- 生活娱乐 (2)
- 至理名言 (11)
- 虚拟化 (2)
- VMware (2)
- 软件开发 (51)
- Asp.Net (9)
- JavaScript (12)
- PHP (2)
- 小工具 (34)
- MongoDB (1)
-
最近发表
- 记录19c ASM磁盘掉线触发ORA-59048故障处理
- aix平台Oracle数据库由于断电无法启动故障处理
- 断电引起ORA-600 3005故障处理
- 记录一次云存储资源到期之后引起的数据库恢复
- Firebird 损坏数据库数据抢救工具—firebirdext
- Oracle 19c 202610补丁(RUs+OJVM)-19.33
- 由于con$.con#值达到极限,触发数据库增加约束报ORA-600 12807错误
- MongoDB 离线提取工具—mongoext
- .bres勒索病毒加密数据库dmp文件可恢复
- ORA-600 krsm_mrp_rebuild_lf_list.lno_mismatch
- 记录一次0丢失的ORA-00354: 损坏重做日志块标头故障恢复
- 不当数据库恢复操作导致一个月数据丢失
- obet快速修复oracle 位图损坏块
- 不太常见的10.2.0.1的oracle redo损坏恢复
- obet forcecopy功能抢救硬件故障中的数据文件
- kcratr_nab_less_than_odr和system坏块故障处理
- 通过obet 恢复system坏块,打开数据库
- obet dbv功能完整说明
- 分享一例运行在aix上的sap系统数据库恢复过程
- OBET-Oracle Block Editor Tool使用说明
分类目录归档:操作系统
extundelete恢复Linux被删除文件
今天群中有个朋友的客户闲着没事rm掉了数据文件,然后讨论到使用extundelete进行了恢复,抢救了部分未被覆盖的数据文件。该软件官方地址:http://extundelete.sourceforge.net/
安装extundelete
[root@xifenfei tmp]# bunzip2 extundelete-0.2.0.tar.bz2 [root@xifenfei 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 [root@xifenfei tmp]# cd extundelete-0.2.0 [root@xifenfei extundelete-0.2.0]# ./configure Configuring extundelete 0.2.0 Writing generated files to disk [root@xifenfei 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'
恢复操作命令
--umount或者read only 分区(如果umount不成功,可以通过fuser -km /www类似方法找出来占用进程) umount /dev/partition mount -o remount,ro /dev/partition --恢复文件 extundelete /dev/partition --restore-all extundelete /dev/partition --restore-directory /backup/gnutool-delete extundelete /dev/partition --restore-files /etc/passwd
测试恢复
--基于目录恢复 [root@xifenfei 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. [root@xifenfei tmp]# cd RECOVERED_FILES/ [root@xifenfei RECOVERED_FILES]# ll total 0 --未成功 --基于磁盘恢复 [root@xifenfei 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. [root@xifenfei RECOVERED_FILES]# ll total 4 drwxr-xr-x 3 root root 4096 Aug 31 21:36 RECOVERED_FILES [root@xifenfei RECOVERED_FILES]# cd RECOVERED_FILES/ [root@xifenfei RECOVERED_FILES]# ll total 4 drwxr-xr-x 3 root root 4096 Aug 31 21:36 xifenfei [root@xifenfei RECOVERED_FILES]# cd xifenfei/ [root@xifenfei 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 [root@xifenfei xifenfei]# cd xff [root@xifenfei xff]# ll total 16 -rw-r--r-- 1 root root 13231 Aug 31 21:36 xff.txt132 --恢复成功 --基于文件恢复 [root@xifenfei 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/ [root@xifenfei xff]# cd RECOVERED_FILES/ [root@xifenfei RECOVERED_FILES]# ll total 0 --未成功
通过上述实验证明extundelete还是有很大的不完整性,基于整个磁盘的恢复功能较为强大,基于目录和文件的恢复还不够强大.不过该软件在很多时候还是有救火的功能,特别是当蛋筒的人员删除了数据库的部分文件之时.
iscsiadm主要操作命令
当前包含磁盘
[root@xifenfei ~]# fdisk -l Disk /dev/sda: 21.4 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 2355 18916506 83 Linux /dev/sda2 2356 2610 2048287+ 82 Linux swap / Solaris Disk /dev/sdb: 21.4 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdb1 1 2610 20964793+ 83 Linux Disk /dev/sdc: 2147 MB, 2147483648 bytes 255 heads, 63 sectors/track, 261 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/sdc doesn't contain a valid partition table Disk /dev/sdd: 21.4 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdd1 1 100 803218+ 83 Linux /dev/sdd2 101 1000 7229250 83 Linux
查看iscsi运行情况
[root@xifenfei ~]# rpm -aq|grep iscsi iscsi-initiator-utils-6.2.0.872-10.0.1.el5 [root@xifenfei ~]# chkconfig --list |grep iscsi iscsi 0:off 1:off 2:on 3:on 4:on 5:on 6:off iscsid 0:off 1:off 2:off 3:on 4:on 5:on 6:off [root@xifenfei ~]# ps -ef|grep iscs root 2753 2 0 Jun21 ? 00:00:00 [iscsi_eh] root 15793 1 0 09:08 ? 00:00:00 brcm_iscsiuio root 15800 1 0 09:08 ? 00:00:00 iscsid root 15802 1 0 09:08 ? 00:00:00 iscsid root 19533 15269 0 10:11 pts/1 00:00:00 grep iscs
配置iscsi存储
[root@xifenfei ~]# iscsiadm -m discovery -t sendtargets -p 192.168.1.254:3260 192.168.1.254:3260,1 iqn.2006-01.com.openfiler:tsn.32b32087937b [root@xifenfei ~]# iscsiadm -m node –T iqn.2006-01.com.openfiler:tsn.32b32087937b -p 192.168.1.254:3260 -l Logging in to [iface: default, target: iqn.2006-01.com.openfiler:tsn.32b32087937b, portal: 192.168.1.254,3260] Login to [iface: default, target: iqn.2006-01.com.openfiler:tsn.32b32087937b, portal: 192.168.1.254,3260] successful. [root@xifenfei ~]# iscsiadm -m node –T iqn.2006-01.com.openfiler:tsn.32b32087937b -p 192.168.1.254:3260 >--op update -n node.startup -v automatic
当前包含磁盘
[root@xifenfei ~]# fdisk -l Disk /dev/sda: 21.4 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 2355 18916506 83 Linux /dev/sda2 2356 2610 2048287+ 82 Linux swap / Solaris Disk /dev/sdb: 21.4 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdb1 1 2610 20964793+ 83 Linux Disk /dev/sdc: 2147 MB, 2147483648 bytes 255 heads, 63 sectors/track, 261 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/sdc doesn't contain a valid partition table Disk /dev/sdd: 21.4 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdd1 1 100 803218+ 83 Linux /dev/sdd2 101 1000 7229250 83 Linux Disk /dev/sde: 1073 MB, 1073741824 bytes 34 heads, 61 sectors/track, 1011 cylinders Units = cylinders of 2074 * 512 = 1061888 bytes Disk /dev/sde doesn't contain a valid partition table Disk /dev/sdf: 1073 MB, 1073741824 bytes 34 heads, 61 sectors/track, 1011 cylinders Units = cylinders of 2074 * 512 = 1061888 bytes Disk /dev/sdf doesn't contain a valid partition table Disk /dev/sdg: 1073 MB, 1073741824 bytes 34 heads, 61 sectors/track, 1011 cylinders Units = cylinders of 2074 * 512 = 1061888 bytes Disk /dev/sdg doesn't contain a valid partition table
卸载iscsi存储
[root@xifenfei ~]# iscsiadm -m node --logoutall=all Logging out of session [sid: 3, target: iqn.2006-01.com.openfiler:tsn.32b32087937b, portal: 192.168.1.254,3260] Logout of [sid: 3, target: iqn.2006-01.com.openfiler:tsn.32b32087937b, portal: 192.168.1.254,3260] successful. [root@xifenfei ~]# iscsiadm -m node --op delete --targetname iqn.2006-01.com.openfiler:tsn.32b32087937b
当前包含磁盘
[root@xifenfei ~]# fdisk -l Disk /dev/sda: 21.4 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 2355 18916506 83 Linux /dev/sda2 2356 2610 2048287+ 82 Linux swap / Solaris Disk /dev/sdb: 21.4 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdb1 1 2610 20964793+ 83 Linux Disk /dev/sdc: 2147 MB, 2147483648 bytes 255 heads, 63 sectors/track, 261 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/sdc doesn't contain a valid partition table Disk /dev/sdd: 21.4 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdd1 1 100 803218+ 83 Linux /dev/sdd2 101 1000 7229250 83 Linux
iscsi操作总结
增加iscsi存储 (1)发现iscsi存储:iscsiadm -m discovery -t st -p ISCSI_IP (2)查看iscsi发现记录:iscsiadm -m node (3)登录iscsi存储:iscsiadm -m node -T LUN_NAME -p ISCSI_IP -l (4)开机自动: iscsiadm -m node –T LUN_NAME -p ISCSI_IP --op update -n node.startup -v automatic 删除iscsi存储 (1)登出iscsi存储 iscsiadm -m node -T LUN_NAME -p ISCSI_IP -u (2)对出iscsi所有登录 iscsiadm -m node --logoutall=all (3)删除iscsi发现记录:iscsiadm -m node -o delete -T LUN_NAME -p ISCSI_IP 登入需验证码的节点 (1)开启认证 iscsiadm -m node -T LUN_NAME -o update --name node.session.auth.authmethod --value=CHAP *.使用-o同--op (2)添加用户 iscsiadm -m node -T LUN_NAME --op update --name node.session.auth.username --value=[用户名] (3)添加密码 iscsiadm –m node –T LUN_NAME –op update –name node.session.auth.password –value=[密码]
发表在 Linux
评论关闭

加我微信(17813235971)
加我QQ(107644445)

