哈爾濱海月數(shù)據(jù)恢復(fù),技術(shù)亞洲領(lǐng)先 設(shè)為首頁加入收藏RSS訂閱
中國區(qū):哈爾濱(總部)、鄭州、福建、深圳沈陽、合肥大連、包頭、淄博上海廣州
    南京、杭州嘉興、武漢濟南、青島、新疆、太原
亞太區(qū):印度韓國、泰國、新加坡、馬來西亞、澳大利亞
Windows
運行中的數(shù)據(jù)庫文件恢復(fù)

  測試平臺:rhel 4.6 and ids10.00uc3r1

  相關(guān)命令:lsof用于顯示打開的文件(list open file),此軟件在其他系統(tǒng)中可能需要另行安裝.

  dd用于覆蓋及復(fù)制文件(convert and copy a file).

  測試?yán)?

  在正在運行的數(shù)據(jù)庫服務(wù)器中(如下)

  [informix@netsky datafile]$ onstat -d

  IBM Informix Dynamic Server Version 10.00.UC3R1 -- On-Line -- Up 00:56:19 -- 28228 Kbytes

  Dbspaces

  address number flags fchunk nchunks pgsize flags owner name

  4442e7e0 1        0x1       1         1         2048     N informix rootdbs

  4442ec90 2        0x2001 2         1          2048     N T informix tempdbs

  4442ede8 3        0x1        3        1          2048      N informix logdbs

  44523630 4        0x1        4        1          2048     N informix phydbs

  44523788 5       0x1         5        1          2048     N informix workdbs

  445238e0 6       0x1         6        1           2048     N informix testdbs0

  44523a38 7       0x1         7        1           2048     N informix testdbs1

  44523b90 8       0x1         8       1            2048     N informix testdbs2

  44523ce8 9        0x1         9       1            2048    N informix testdbs3

  44523e40 10      0x1        10     1             2048     N informix testdbs4

  10 active, 2047 maximum

  Chunks

  address chunk/dbs offset size free bpages flags pathname

  4442e938 1 1 20 20000 12108 PO-- /opt/informix/datafile/rootdbs

  445342f0 2 2 20 20000 19947 PO-- /opt/informix/datafile/tempdbs

  44534478 3 3 20 20450 397 PO-- /opt/informix/datafile/logdbs

  44534600 4 4 20 20450 19397 PO-- /opt/informix/datafile/phydbs

  44534788 5 5 20 51150 39948 PO-- /opt/informix/datafile/workdbs

  44534910 6 6 0 20000 19911 PO-- /opt/informix/datafile/testdbs0

  44534a98 7 7 0 20000 19947 PO-- /opt/informix/datafile/testdbs1

  44534c20 8 8 0 20000 19947 PO-- /opt/informix/datafile/testdbs2

  44534da8 9 9 0 20000 19947 PO-- /opt/informix/datafile/testdbs3

  4442eb08 10 10 0 20000 19947 PO-- /opt/informix/datafile/testdbs4

  10 active, 2047 maximum

  NOTE: The values in the "size" and "free" columns for DBspace chunks are

  displayed in terms of "pgsize" of the DBspace to which they belong.

  Expanded chunk capacity mode: disabled

  往testdbs0中增加一些測試數(shù)據(jù)

  informix@netsky ~]$ dbaccess dbmon -

  Database selected.

  >create table ttt (id char(10)) in testdbs0;

  >insert into ttt values('000');

  >insert into ttt values('111');

  做onmode -c強制完全checkpoint,把數(shù)據(jù)刷回磁盤.

  然后刪除數(shù)據(jù)塊testdbs0

  [informix@netsky datafile]$ ll

  drwxrwxr-x 2 informix informix 4096 Nov 27 06:06 bakup

  -rw-rw---- 1 informix informix 41922560 Feb 10 00:06 logdbs

  -rw-rw---- 1 informix informix 41922560 Feb 9 23:14 phydbs

  -rw-rw---- 1 informix informix 41000960 Feb 10 00:06 rootdbs

  -rw-rw---- 1 informix informix 41000960 Feb 9 23:17 tempdbs

  -rw-rw---- 1 informix informix 40960000 Nov 27 06:01 testdbs1 --testdbs0被刪除.

  -rw-rw---- 1 informix informix 104796160 Feb 9 23:13 workdbs

  此時可以通過lsof查找數(shù)據(jù)庫打開的文件testdbs0,可以看到該文件已經(jīng)被標(biāo)識刪除了.

  [root@netsky datafile]# lsof | egrep '(COMMAND|deleted)'

  COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME

  oninit 23864 root 261u REG 253,0 40960000 620162 /opt/informix/datafile/testdbs0 (deleted)

  oninit 23868 root 258u REG 253,0 40960000 620162 /opt/informix/datafile/testdbs0 (deleted)

  此時再查看testdbs0上的數(shù)據(jù),并往testdbs0中增加一些數(shù)據(jù).

  informix@netsky ~]$ dbaccess dbmon -

  Database selected.

  > select * from ttt;

  id

  000

  111

  2 row(s) retrieved.

  > insert into ttt values('333');

  1 row(s) inserted.

  做onmode -c強制完全checkpoint,把數(shù)據(jù)刷回磁盤.

  然后把已經(jīng)刪除的testdbs0恢復(fù)出來備份.

  在這里,結(jié)合lsof的輸出信息PID進(jìn)入相應(yīng)的目錄,再通過FD號進(jìn)行dd恢復(fù).

  [root@netsky fd]# cd /proc/23864/fd

  [root@netsky fd]# ll

  total 13

  lr-x------ 1 root root 64 Feb 9 23:36 0 -> /opt/informix/msg/en_us/0333/olmsglog.iem

  lrwx------ 1 root root 64 Feb 9 23:36 1 -> /dev/pts/2

  lrwx------ 1 root root 64 Feb 9 23:36 2 -> /dev/pts/2

  lrwx------ 1 root root 64 Feb 9 23:36 256 -> /opt/informix/datafile/rootdbs

  lrwx------ 1 root root 64 Feb 9 23:36 257 -> /opt/informix/datafile/tempdbs

  lrwx------ 1 root root 64 Feb 9 23:36 258 -> /opt/informix/datafile/logdbs

  lrwx------ 1 root root 64 Feb 9 23:36 259 -> /opt/informix/datafile/phydbs

  lrwx------ 1 root root 64 Feb 9 23:36 260 -> /opt/informix/datafile/workdbs

  lrwx------ 1 root root 64 Feb 9 23:36 261 -> /opt/informix/datafile/testdbs0 (deleted)

  lrwx------ 1 root root 64 Feb 9 23:36 262 -> /opt/informix/datafile/testdbs1

  lrwx------ 1 root root 64 Feb 9 23:36 263 -> /opt/informix/datafile/testdbs2

  lrwx------ 1 root root 64 Feb 9 23:36 264 -> /opt/informix/datafile/testdbs3

  lrwx------ 1 root root 64 Feb 9 23:36 265 -> /opt/informix/datafile/testdbs4

  這里在PID 23864的FD(File Descriptor)為261即為我們所要的.將其dd出來到/tmp/testdbs0

  [root@netsky fd]# dd if=261 of=/tmp/testdbs0

  80000+0 records in

  80000+0 records out

  完成以上操作后,停止數(shù)據(jù)庫.

  [informix@netsky datafile]$ onmode -ky

  將恢復(fù)的數(shù)據(jù)文件拷回原目錄,并修改權(quán)限

  [informix@netsky datafile]$ cp /tmp/testdbs0 /opt/informix/datafile/testdbs0

  [informix@netsky datafile]$ chmod 660 testdbs0 ;chown informix:informix testdbs0

  重新啟動數(shù)據(jù)庫

  [informix@netsky datafile]$ oninit -vy

  驗證數(shù)據(jù)文件恢復(fù).

  [informix@netsky datafile]$ dbaccess dbmon -

  Database selected.

  > select * from ttt;

  id

  000

  111

  333

  3 row(s) retrieved.

  例子驗證,在testdbs0被刪除后,文件被刪除后,數(shù)據(jù)上并未完全刪除的,只是其inode信息在系統(tǒng)上被刪除.但正在使用其的程序仍保留了這個inode信息,程序仍可以往里面寫入信息..在程序關(guān)閉前,可通過FD(File Descriptor)的方式進(jìn)行恢復(fù).

  注意:要求的是文件必須仍被打開..這樣的操作并不是十分保險的,可能會造成數(shù)據(jù)損壞或者缺少.

  -rw-rw---- 1 informix informix 40960000 Nov 27 06:01 testdbs2

  -rw-rw---- 1 informix informix 40960000 Nov 27 06:01 testdbs3

  -rw-rw---- 1 informix informix 40960000 Nov 27 06:01 testdbs4

 
客戶服務(wù) +more
上門服務(wù)
服務(wù)承諾
異地恢復(fù)
收費標(biāo)準(zhǔn)
付款方式
疑難解答
服務(wù)特色 +more
·免費檢測
·免費提供3天備份
·專業(yè)工程師提供服務(wù)
·免費清潔送修的介質(zhì)
·數(shù)據(jù)恢復(fù)前報價,客戶確認(rèn)后工程師開始數(shù)據(jù)恢復(fù)
·數(shù)據(jù)恢復(fù)不成功不收費
·與客戶簽訂保密協(xié)議,對客戶的數(shù)
 據(jù)嚴(yán)格保密,整個恢復(fù)過程不會對
 客戶的原盤有任何的寫操作,以確
 保原盤的數(shù)據(jù)完全

·免費參觀恢復(fù)全過程

·工程師在線免費咨詢

·專業(yè)工程師提供服務(wù)
服務(wù)器數(shù)據(jù)恢復(fù) 點擊這里給我發(fā)消

息
數(shù)據(jù)庫修復(fù)
點擊這里給我發(fā)

消息
硬盤數(shù)據(jù)恢復(fù)
點擊這里給我發(fā)消

息
主站蜘蛛池模板: 午夜DV内射一区区| 国模少妇一区二区三区| 亚洲av无码一区二区三区在线播放| 美女视频黄a视频全免费网站一区| 精品一区二区三区免费毛片爱| 高清一区二区在线观看| 亚洲A∨无码一区二区三区| 亚洲av一综合av一区| 精品视频一区二区三区四区五区 | 免费萌白酱国产一区二区| 成人免费观看一区二区| 伊人无码精品久久一区二区| 久久国产免费一区| 亚洲一区二区三区在线观看精品中文 | 一区二区三区在线视频播放| 亚洲愉拍一区二区三区| 亚洲视频一区在线播放| 国产精品资源一区二区| 爆乳熟妇一区二区三区霸乳| 无码人妻精品一区二区三区在线 | 视频一区视频二区日韩专区| 日韩一区在线视频| 国产成人一区二区三区高清| 久久久无码精品人妻一区| 国产精品久久久久久麻豆一区| 精品国产一区二区三区久久久狼| 四虎在线观看一区二区| 天堂一区二区三区精品| 国偷自产av一区二区三区| 久久久精品一区二区三区| 亚洲欧美一区二区三区日产| 中文字幕AV一区二区三区人妻少妇 | 日韩在线视频一区二区三区| 国产综合无码一区二区色蜜蜜| 国产成人精品一区在线| 日本高清不卡一区| 亚洲国产AV无码一区二区三区| 免费一区二区三区四区五区| 国产在线观看一区精品| 无码国产精品久久一区免费 | 日韩电影一区二区三区|