虛擬化技術(shù)原理是將硬件虛擬化給不同的虛擬機(jī)使用,利用虛擬化技術(shù)可以在一臺(tái)物理機(jī)上安裝多臺(tái)虛擬機(jī)。誤操作或者物理機(jī)器出現(xiàn)故障都會(huì)導(dǎo)致虛擬機(jī)不可用,虛擬機(jī)中的數(shù)據(jù)丟失。
虛擬化數(shù)據(jù)恢復(fù)環(huán)境:
有一臺(tái)虛擬機(jī)是由物理機(jī)遷移到ESXI上面的,遷移完成后為該虛擬機(jī)做了一個(gè)快照。虛擬機(jī)上運(yùn)行了一個(gè)SQL Server數(shù)據(jù)庫,記錄了5年左右的數(shù)據(jù)。
該ESXI上共有二十幾臺(tái)虛擬機(jī),EXSI連接一臺(tái)某品牌EVA存儲(chǔ),所有的虛擬機(jī)(包括故障虛擬機(jī))都存放在該EVA存儲(chǔ)上。
虛擬機(jī)故障:
工作人員的誤操作將數(shù)年前剛遷移后做的快照給還原了。快照是數(shù)年前做完遷移時(shí)創(chuàng)建的,也就是說虛擬機(jī)數(shù)據(jù)還原到數(shù)年前了,近幾年更新的數(shù)據(jù)都被刪除了。
還原快照相當(dāng)于刪除數(shù)據(jù),意味著底層的存儲(chǔ)空間會(huì)被釋放一部分。誤還原快照后,為了避免這部分釋放的空間被重新使用覆蓋,需要將連接這臺(tái)存儲(chǔ)的所有虛擬機(jī)都關(guān)機(jī)。如果有重要的虛擬機(jī)不能長(zhǎng)時(shí)間宕機(jī),則需要將不能長(zhǎng)時(shí)間宕機(jī)的虛擬機(jī)遷移到別的EXSI上。剛好本例中有一臺(tái)虛擬機(jī)不能長(zhǎng)時(shí)間關(guān)機(jī),只能做熱遷移。遷移完所有虛擬機(jī)后就著手開始恢復(fù)虛擬機(jī)數(shù)據(jù)了。
虛擬機(jī)數(shù)據(jù)恢復(fù)過程:
Tips:Vmware文件系統(tǒng)是Vmfs,所有的虛擬機(jī)都存放在Vmfs中。Vmfs默認(rèn)會(huì)將整個(gè)磁盤空間劃分為1M的Block,分配給文件的最小單位為一個(gè)Block。Vmfs中有一片區(qū)域描述這些1M Block的使用情況,而每1024個(gè)Block(也就是1GB)會(huì)用一個(gè)MAP來記錄。MAP記錄的1M的 Block在物理磁盤上不一定是連續(xù)的,但這個(gè)MAP所記錄的所有1M的Block一定是同一個(gè)文件的。即:一個(gè)文件是由N多個(gè)MAP中的1024個(gè)Block組成的,即FileSize = N * MAP * 1024(Block)。
Vmware的快照其實(shí)就是一個(gè)文件,還原快照也就是刪掉一個(gè)文件。在Vmfs中,刪除一個(gè)文件只會(huì)刪掉文件的索引項(xiàng),而不會(huì)刪掉文件的實(shí)際數(shù)據(jù)以及指向數(shù)據(jù)的MAP。
1、備份過程在這里就不贅述了。備份完成后北亞企安數(shù)據(jù)恢復(fù)工程師編寫程序開始提取vmfs中空閑的MAP。
2、在空閑的MAP中找到一個(gè)符合快照文件頭結(jié)構(gòu)的MAP。
3、根據(jù)快照文件的結(jié)構(gòu),提取快照文件剩下的碎片。
4、提取完快照文件后,將快照文件和原vmdk合并生成新的vmdk,新的vmdk中包含了所有的數(shù)據(jù)。
5、掛載新的vmdk并解釋vmdk中的數(shù)據(jù)。
審核編輯 黃宇
-
服務(wù)器
+關(guān)注
關(guān)注
12文章
9303瀏覽量
86061 -
數(shù)據(jù)恢復(fù)
+關(guān)注
關(guān)注
10文章
585瀏覽量
17630 -
虛擬機(jī)
+關(guān)注
關(guān)注
1文章
937瀏覽量
28426
發(fā)布評(píng)論請(qǐng)先 登錄
相關(guān)推薦
虛擬化數(shù)據(jù)恢復(fù)—誤還原Vmware虛擬機(jī)快照的數(shù)據(jù)恢復(fù)案例
虛擬化數(shù)據(jù)恢復(fù)—XenServer虛擬機(jī)數(shù)據(jù)恢復(fù)案例
![<b class='flag-5'>虛擬</b><b class='flag-5'>化</b><b class='flag-5'>數(shù)據(jù)</b><b class='flag-5'>恢復(fù)</b>—XenServer<b class='flag-5'>虛擬機(jī)</b><b class='flag-5'>數(shù)據(jù)</b><b class='flag-5'>恢復(fù)</b>案例](https://file1.elecfans.com/web1/M00/F4/8B/wKgZoWctd42AfXpjAAbtwDYtgLM057.png)
虛擬化數(shù)據(jù)恢復(fù)——Hyper-V虛擬機(jī)數(shù)據(jù)恢復(fù)案例
![<b class='flag-5'>虛擬</b><b class='flag-5'>化</b><b class='flag-5'>數(shù)據(jù)</b><b class='flag-5'>恢復(fù)</b>——Hyper-V<b class='flag-5'>虛擬機(jī)</b><b class='flag-5'>數(shù)據(jù)</b><b class='flag-5'>恢復(fù)</b>案例](https://file1.elecfans.com/web2/M00/8F/DD/wKgZomTTN6qAWIF8AAM51-OjElE231.png)
虛擬機(jī)數(shù)據(jù)恢復(fù)—異常斷電導(dǎo)致XenServer虛擬機(jī)不可用的數(shù)據(jù)恢復(fù)案例
![<b class='flag-5'>虛擬機(jī)</b><b class='flag-5'>數(shù)據(jù)</b><b class='flag-5'>恢復(fù)</b>—異常斷電導(dǎo)致XenServer<b class='flag-5'>虛擬機(jī)</b>不可用的<b class='flag-5'>數(shù)據(jù)</b><b class='flag-5'>恢復(fù)</b>案例](https://file1.elecfans.com/web2/M00/8F/99/wKgaomTQm3qAf9x-AATepdcm3zE240.png)
服務(wù)器數(shù)據(jù)恢復(fù)—意外斷電導(dǎo)致虛擬機(jī)虛擬磁盤損壞的數(shù)據(jù)恢復(fù)案例
![服務(wù)器<b class='flag-5'>數(shù)據(jù)</b><b class='flag-5'>恢復(fù)</b>—意外斷電導(dǎo)致<b class='flag-5'>虛擬機(jī)</b><b class='flag-5'>虛擬</b>磁盤損壞的<b class='flag-5'>數(shù)據(jù)</b><b class='flag-5'>恢復(fù)</b>案例](https://file1.elecfans.com/web2/M00/06/D9/wKgaombgEEiAVY7VAAYC73oyK0Y831.png)
虛擬機(jī)數(shù)據(jù)恢復(fù)—KVM虛擬機(jī)被誤刪除的數(shù)據(jù)恢復(fù)案例
![<b class='flag-5'>虛擬機(jī)</b><b class='flag-5'>數(shù)據(jù)</b><b class='flag-5'>恢復(fù)</b>—KVM<b class='flag-5'>虛擬機(jī)</b>被誤刪除的<b class='flag-5'>數(shù)據(jù)</b><b class='flag-5'>恢復(fù)</b>案例](https://file.elecfans.com/web2/M00/AD/F3/poYBAGSadTWACtx5AANUKGY87Ws406.png)
虛擬化數(shù)據(jù)恢復(fù)—XenServer虛擬化平臺(tái)數(shù)據(jù)恢復(fù)案例
![<b class='flag-5'>虛擬</b><b class='flag-5'>化</b><b class='flag-5'>數(shù)據(jù)</b><b class='flag-5'>恢復(fù)</b>—XenServer<b class='flag-5'>虛擬</b><b class='flag-5'>化</b>平臺(tái)<b class='flag-5'>數(shù)據(jù)</b><b class='flag-5'>恢復(fù)</b>案例](https://file.elecfans.com/web2/M00/AE/1A/pYYBAGSX8eGASgKZAAaJGAB7KcI397.png)
服務(wù)器數(shù)據(jù)恢復(fù)—異常斷電導(dǎo)致虛擬機(jī)配置文件丟失的數(shù)據(jù)恢復(fù)案例
![服務(wù)器<b class='flag-5'>數(shù)據(jù)</b><b class='flag-5'>恢復(fù)</b>—異常斷電導(dǎo)致<b class='flag-5'>虛擬機(jī)</b>配置文件丟失的<b class='flag-5'>數(shù)據(jù)</b><b class='flag-5'>恢復(fù)</b>案例](https://file.elecfans.com/web2/M00/A8/14/pYYBAGRvGYiADFTzAAU7mrFVkPI702.png)
服務(wù)器數(shù)據(jù)恢復(fù)—EMC Isilon存儲(chǔ)中虛擬機(jī)數(shù)據(jù)恢復(fù)案例
![服務(wù)器<b class='flag-5'>數(shù)據(jù)</b><b class='flag-5'>恢復(fù)</b>—EMC Isilon存儲(chǔ)中<b class='flag-5'>虛擬機(jī)</b><b class='flag-5'>數(shù)據(jù)</b><b class='flag-5'>恢復(fù)</b>案例](https://file1.elecfans.com/web2/M00/EE/2E/wKgaomZqhYSAF4SpAALVCukOeT0001.png)
服務(wù)器數(shù)據(jù)恢復(fù)—異常斷電導(dǎo)致VMware虛擬機(jī)無法啟動(dòng)的數(shù)據(jù)恢復(fù)案例
![服務(wù)器<b class='flag-5'>數(shù)據(jù)</b><b class='flag-5'>恢復(fù)</b>—異常斷電導(dǎo)致VMware<b class='flag-5'>虛擬機(jī)</b>無法啟動(dòng)的<b class='flag-5'>數(shù)據(jù)</b><b class='flag-5'>恢復(fù)</b>案例](https://file1.elecfans.com/web2/M00/EA/FA/wKgaomZWoICAMtllAAGZLb4FUTE216.png)
服務(wù)器數(shù)據(jù)恢復(fù)—KVM虛擬機(jī)raw格式磁盤文件數(shù)據(jù)恢復(fù)案例
![服務(wù)器<b class='flag-5'>數(shù)據(jù)</b><b class='flag-5'>恢復(fù)</b>—KVM<b class='flag-5'>虛擬機(jī)</b>raw格式磁盤文件<b class='flag-5'>數(shù)據(jù)</b><b class='flag-5'>恢復(fù)</b>案例](https://file.elecfans.com/web2/M00/A3/D5/poYBAGRZ6kOAAPRJAANo3SqJ5yk832.png)
服務(wù)器數(shù)據(jù)恢復(fù)—VMware虛擬機(jī)無法啟動(dòng)的數(shù)據(jù)恢復(fù)案例
虛擬機(jī)數(shù)據(jù)恢復(fù)—EXT4文件系統(tǒng)下KVM虛擬機(jī)數(shù)據(jù)恢復(fù)案例
![<b class='flag-5'>虛擬機(jī)</b><b class='flag-5'>數(shù)據(jù)</b><b class='flag-5'>恢復(fù)</b>—EXT4文件系統(tǒng)下KVM<b class='flag-5'>虛擬機(jī)</b><b class='flag-5'>數(shù)據(jù)</b><b class='flag-5'>恢復(fù)</b>案例](https://file.elecfans.com/web2/M00/9F/0E/pYYBAGQ2R8aAUmkaAARYcpNj9Ag613.png)
虛擬機(jī)數(shù)據(jù)恢復(fù)-虛擬機(jī)還原快照原理和誤還原快照的數(shù)據(jù)恢復(fù)方案
![<b class='flag-5'>虛擬機(jī)</b><b class='flag-5'>數(shù)據(jù)</b><b class='flag-5'>恢復(fù)</b>-<b class='flag-5'>虛擬機(jī)</b><b class='flag-5'>還原</b><b class='flag-5'>快照</b>原理和<b class='flag-5'>誤</b><b class='flag-5'>還原</b><b class='flag-5'>快照</b>的<b class='flag-5'>數(shù)據(jù)</b><b class='flag-5'>恢復(fù)</b>方案](https://file1.elecfans.com/web2/M00/C2/34/wKgaomXdXNOAB5RGAAF79aoW9Ew715.png)
評(píng)論