TWI826093B - Virtual machine backup method and system - Google Patents

Virtual machine backup method and system Download PDF

Info

Publication number
TWI826093B
TWI826093B TW111141793A TW111141793A TWI826093B TW I826093 B TWI826093 B TW I826093B TW 111141793 A TW111141793 A TW 111141793A TW 111141793 A TW111141793 A TW 111141793A TW I826093 B TWI826093 B TW I826093B
Authority
TW
Taiwan
Prior art keywords
data
virtual machine
host
location information
key value
Prior art date
Application number
TW111141793A
Other languages
Chinese (zh)
Other versions
TW202420077A (en
Inventor
陳立群
江立豪
錡靖
徐瑋傑
王建文
黃文鐸
Original Assignee
財團法人資訊工業策進會
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 財團法人資訊工業策進會 filed Critical 財團法人資訊工業策進會
Priority to TW111141793A priority Critical patent/TWI826093B/en
Priority to US18/197,582 priority patent/US20240143455A1/en
Application granted granted Critical
Publication of TWI826093B publication Critical patent/TWI826093B/en
Publication of TW202420077A publication Critical patent/TW202420077A/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1469Backup restoration techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances

Abstract

A virtual machine backup method includes, performed by a first host: extracting a writing request from a virtual machine to a disk image file, wherein the writing request includes writing data, input location information and output location information, copying the writing data to a temporary storage area of the first host, calculating a first key of the writing data, storing the first key, the input location information and the output location information into a first resource location structure, pausing an operation of the virtual machine and generating a second resource location structure according to the first resource location structure and a comparison result between the first key and a second key corresponding to the input location information, wherein the key corresponds to existing data in the temporary storage area, and output a backup data group to a second host according to the second resource location structure, for the second host to generate a copy of the virtual machine and a copy of the disk image file, wherein the backup data group includes the second resource location structure and only one of the existing data and the writing data when the first key and the second key are the same.

Description

虛擬機器備援方法及系統Virtual machine backup method and system

本發明係關於一種虛擬機器備援方法及系統。The invention relates to a virtual machine backup method and system.

為了提供系統服務的可靠性及讓服務不中斷,特別是提供雲端運算服務的系統及主機,許多種類的備援技術正持續發展與進步。虛擬機器在上述技術的支持下,已可於主機故障的狀況時快速移轉至備用主機上運行並持續提供服務。既有的虛擬機器會對硬碟資料進行備份,例如備份記憶體與主機狀態等運算資源,達成完整虛擬機器備援與資料完整性的目標。In order to provide system service reliability and ensure uninterrupted services, especially for systems and hosts that provide cloud computing services, many types of backup technologies are continuing to develop and advance. With the support of the above-mentioned technologies, virtual machines can be quickly moved to backup hosts and continue to provide services in the event of host failure. Existing virtual machines will back up hard disk data, such as backing up computing resources such as memory and host status, to achieve the goals of complete virtual machine redundancy and data integrity.

然而,於備用主機的保護啟用後,及虛擬機器對頻繁儲存資料的應用程式(例如,資料庫)進行寫入時,作業系統及應用程式的快取機制會產生相同資料內容但位於不同位址上。因此,備用主機需花費較長的時間及需要較大的頻寬來處理額外的資料副本,導致備份時間增加,也影響了虛擬機器中應用程式的執行效能。However, after the protection of the backup host is enabled and the virtual machine writes to an application that frequently stores data (such as a database), the cache mechanism of the operating system and the application will generate the same data content but located at different addresses. superior. Therefore, the backup host takes a longer time and requires larger bandwidth to process the additional data copies, which increases the backup time and affects the execution performance of the applications in the virtual machine.

鑒於上述,本發明提供一種解決上述問題及高即時性的虛擬機器備援方法及系統。In view of the above, the present invention provides a virtual machine backup method and system that solves the above problems and provides high real-time performance.

依據本發明一實施例的一種虛擬機器備援方法,包括以第一主機執行:擷取虛擬機器對硬碟映像檔的寫入請求,其中寫入請求包含寫入資料、輸入位置資訊及輸出位置資訊;將寫入資料複製到第一主機的資料暫存區;計算寫入資料的第一鍵值;將第一鍵值、輸入位置資訊及輸出位置資訊存入第一資源位置結構;暫停虛擬機器的運作,並根據第一資源位置結構及判斷第一鍵值與對應於輸入位置資訊的第二鍵值的比較結果產生第二資源位置結構,其中第二鍵值對應於資料暫存區中的既存資料;以及根據第二資源位置結構輸出備援資料組至第二主機,以供第二主機產生虛擬機器的副本及硬碟映像檔的副本,其中當第一鍵值與第二鍵值相同時,備援資料組包含第二資源位置結構以及既存資料與寫入資料中的僅一者。A virtual machine backup method according to an embodiment of the present invention includes executing on a first host: retrieving a writing request for a hard disk image file from a virtual machine, where the writing request includes writing data, input location information, and output location. information; copy the written data to the data temporary storage area of the first host; calculate the first key value of the written data; store the first key value, input location information and output location information into the first resource location structure; pause the virtual The machine operates and generates a second resource location structure based on the first resource location structure and the comparison result of the first key value and the second key value corresponding to the input location information, where the second key value corresponds to the data temporary storage area. existing data; and output the backup data group to the second host according to the second resource location structure, so that the second host can generate a copy of the virtual machine and a copy of the hard disk image file, where when the first key value and the second key value At the same time, the backup data group includes the second resource location structure and only one of the existing data and the written data.

依據本發明一實施例的一種虛擬機器備援系統包括第一主機以及第二主機。第一主機包括虛擬機器、資料暫存區以及硬碟映像檔,虛擬機器連接於資料暫存區,第一主機用於輸出備援資料組。第二主機連接於第一主機,第二主機用於接收備援資料組,以及產生虛擬機器的副本及硬碟映像檔的副本。第一主機更用於執行:擷取虛擬機器對硬碟映像檔的寫入請求,其中寫入請求包含寫入資料、輸入位置資訊及輸出位置資訊;將寫入資料複製到資料暫存區;計算寫入資料的第一鍵值;將第一鍵值、輸入位置資訊及輸出位置資訊存入第一資源位置結構;暫停虛擬機器的運作,並根據第一資源位置結構及判斷第一鍵值與對應於輸入位置資訊的第二鍵值的比較結果產生第二資源位置結構,其中第二鍵值對應於資料暫存區中的既存資料;以及根據第二資源位置結構輸出備援資料組至第二主機,以供第二主機產生虛擬機器的副本及硬碟映像檔的副本,其中當第一鍵值與第二鍵值相同時,備援資料組包含第二資源位置結構以及既存資料與寫入資料中的僅一者。A virtual machine backup system according to an embodiment of the present invention includes a first host and a second host. The first host includes a virtual machine, a data temporary storage area and a hard disk image file. The virtual machine is connected to the data temporary storage area, and the first host is used to output a backup data group. The second host is connected to the first host, and is used for receiving the redundant data set and generating a copy of the virtual machine and a copy of the hard disk image file. The first host is further used to execute: retrieve the virtual machine's write request for the hard disk image file, where the write request includes write data, input location information, and output location information; copy the write data to the data temporary storage area; Calculate the first key value of the written data; store the first key value, input location information and output location information into the first resource location structure; pause the operation of the virtual machine, and determine the first key value based on the first resource location structure The comparison result with the second key value corresponding to the input location information generates a second resource location structure, wherein the second key value corresponds to the existing data in the data temporary storage area; and the backup data set is output according to the second resource location structure to The second host is used for the second host to generate a copy of the virtual machine and a copy of the hard disk image file. When the first key value and the second key value are the same, the backup data group includes the second resource location structure and the existing data and Only one of the data is written.

綜上所述,依據本發明一或多個實施例所示的虛擬機器備援方法及系統,可以即時地擷取虛擬機器的運作資料,且透過對寫入資料進行去重複,可以降低傳輸備援資料組所需的網路頻寬及所需的時間。另外,透過擷取及暫存第一鍵值、輸入位置資訊及輸出位置資訊存入第一資源位置結構的機制,當後續第一主機需暫停第一虛擬機器的運作時,第一主機不需再次從第一硬碟的硬碟映像檔讀取資料,而是可使用第一資源位置結構及/或第一資料暫存區中的資料。因此,可以加速暫停第一虛擬機器以取得備援資料組的流程。依據本發明一或多個實施例所示的虛擬機器備援方法及系統可以適用於本地端機房或異地端機房的虛擬機器備援情境。此外,當與異地端機房間是處於低頻寬環境下時,也可以有更佳的目標還原點(recovery point,RPO),以減少損失資料。In summary, according to the virtual machine backup method and system shown in one or more embodiments of the present invention, the operating data of the virtual machine can be captured in real time, and by deduplicating the written data, the transmission backup time can be reduced. The network bandwidth and time required to support the data set. In addition, through the mechanism of retrieving and temporarily storing the first key value, input location information, and output location information into the first resource location structure, when the first host subsequently needs to suspend the operation of the first virtual machine, the first host does not need to The data is read from the hard disk image file of the first hard disk again, but the data in the first resource location structure and/or the first data temporary storage area can be used. Therefore, the process of suspending the first virtual machine to obtain the backup data set can be accelerated. The virtual machine backup method and system shown in one or more embodiments of the present invention can be applied to a virtual machine backup scenario in a local computer room or a remote computer room. In addition, when the remote computer room is in a low-bandwidth environment, a better recovery point (RPO) can be set to reduce data loss.

以上之關於本揭露內容之說明及以下之實施方式之說明係用以示範與解釋本發明之精神與原理,並且提供本發明之專利申請範圍更進一步之解釋。The above description of the present disclosure and the following description of the embodiments are used to demonstrate and explain the spirit and principles of the present invention, and to provide further explanation of the patent application scope of the present invention.

以下在實施方式中詳細敘述本發明之詳細特徵以及優點,其內容足以使任何熟習相關技藝者了解本發明之技術內容並據以實施,且根據本說明書所揭露之內容、申請專利範圍及圖式,任何熟習相關技藝者可輕易地理解本發明相關之目的及優點。以下之實施例係進一步詳細說明本發明之觀點,但非以任何觀點限制本發明之範疇。The detailed features and advantages of the present invention are described in detail below in the implementation mode. The content is sufficient to enable anyone skilled in the relevant art to understand the technical content of the present invention and implement it according to the content disclosed in this specification, the patent scope and the drawings. , anyone familiar with the relevant art can easily understand the relevant objectives and advantages of the present invention. The following examples further illustrate the aspects of the present invention in detail, but do not limit the scope of the present invention in any way.

請參考圖1,圖1係依據本發明一實施例所繪示的虛擬機器備援系統的方塊圖。如圖1所示,虛擬機器備援系統1包括第一主機10以及第二主機20。第一主機10及第二主機20可各為一台電腦或伺服器,且第一主機10與第二主機20可以透過有線或無線的方式連接,例如乙太網路、區域網路、Wifi、藍牙、行動網路、低軌道衛星通訊網路等,本發明不對第一主機10與第二主機20之間的連線方式予以限制。第一主機10可作為第一虛擬機器101主要運行之主機,第二主機20可作為備份第一虛擬機器101的運作狀態之主機。換言之,第一主機10可為使用者正在操作的電腦或伺服器,第二主機20可為另一台電腦或伺服器,第二主機20的第二虛擬機器201用於備份第一虛擬機器101的記憶體內容、硬碟映像檔內容及處理器的狀態等。因此,當第一主機10的第一虛擬機器101因故障或各種因素暫停運作時,第二主機20的第二虛擬機器201可以還原第一主機10的第一虛擬機器101在暫停運作前的運作狀態。Please refer to FIG. 1 , which is a block diagram of a virtual machine backup system according to an embodiment of the present invention. As shown in FIG. 1 , the virtual machine backup system 1 includes a first host 10 and a second host 20 . The first host 10 and the second host 20 can each be a computer or a server, and the first host 10 and the second host 20 can be connected through wired or wireless means, such as Ethernet, local area network, Wifi, Bluetooth, mobile network, low-orbit satellite communication network, etc., the present invention does not limit the connection method between the first host 10 and the second host 20. The first host 10 can be used as the main host for running the first virtual machine 101, and the second host 20 can be used as the host for backing up the operating status of the first virtual machine 101. In other words, the first host 10 can be the computer or server that the user is operating, the second host 20 can be another computer or server, and the second virtual machine 201 of the second host 20 is used to back up the first virtual machine 101 memory contents, hard disk image file contents, processor status, etc. Therefore, when the first virtual machine 101 of the first host 10 suspends operation due to a fault or various factors, the second virtual machine 201 of the second host 20 can restore the operation of the first virtual machine 101 of the first host 10 before the operation was suspended. condition.

第一主機10包括第一虛擬機器101、第一資料同步模組102、第一資源管理模組103、第一資料暫存區104、第一硬碟105以及代理模組106。第一資料同步模組102、第一資源管理模組103及代理模組106可為以軟體實現的模組,且這些模組可由電腦的處理器執行。第一資料暫存區104可為電腦的記憶體中的儲存區塊,第一硬碟105可為電腦中的實體硬碟或虛擬硬碟。第一硬碟105可用於儲存第一主機10的硬碟映像檔,代理模組106可以為輸入/輸出(input/output,I/O)代理模組。第一資料同步模組102連接於第一虛擬機器101與第一資源管理模組103之間。第一資源管理模組103連接於第一資料暫存區104及代理模組106,且存有第一資源位置結構。第一資料暫存區104連接於代理模組106,且代理模組106更連接於第一硬碟105。上述各模組的功能於後描述。The first host 10 includes a first virtual machine 101, a first data synchronization module 102, a first resource management module 103, a first data temporary storage area 104, a first hard disk 105 and an agent module 106. The first data synchronization module 102, the first resource management module 103 and the agent module 106 can be modules implemented in software, and these modules can be executed by the processor of the computer. The first data temporary storage area 104 can be a storage block in the computer's memory, and the first hard disk 105 can be a physical hard disk or a virtual hard disk in the computer. The first hard disk 105 can be used to store the hard disk image file of the first host 10 , and the agent module 106 can be an input/output (I/O) agent module. The first data synchronization module 102 is connected between the first virtual machine 101 and the first resource management module 103 . The first resource management module 103 is connected to the first data temporary storage area 104 and the proxy module 106, and has a first resource location structure. The first data temporary storage area 104 is connected to the agent module 106, and the agent module 106 is further connected to the first hard disk 105. The functions of each of the above modules are described later.

第二主機20包括第二虛擬機器201、第二資料同步模組202、第二資源管理模組203、第二資料暫存區204以及第二硬碟205。第二資料同步模組202及第二資源管理模組203可為以軟體實現的模組,且這些模組可由電腦的處理器執行。第二資料暫存區204可為電腦的記憶體中的儲存區塊,第二硬碟205可為電腦中的實體硬碟或虛擬硬碟,第二硬碟205可用於儲存第一主機10的硬碟映像檔的副本。第二資料同步模組202連接於第一資料同步模組102、第二虛擬機器201、第二資源管理模組203以及第二硬碟205,且第二資源管理模組203連接於第二資料暫存區204。上述各模組的功能於後描述。The second host 20 includes a second virtual machine 201, a second data synchronization module 202, a second resource management module 203, a second data temporary storage area 204 and a second hard disk 205. The second data synchronization module 202 and the second resource management module 203 can be modules implemented in software, and these modules can be executed by the processor of the computer. The second data temporary storage area 204 can be a storage block in the memory of the computer. The second hard disk 205 can be a physical hard disk or a virtual hard disk in the computer. The second hard disk 205 can be used to store the data of the first host 10 A copy of the hard drive image file. The second data synchronization module 202 is connected to the first data synchronization module 102, the second virtual machine 201, the second resource management module 203 and the second hard disk 205, and the second resource management module 203 is connected to the second data Staging area 204. The functions of each of the above modules are described later.

為了更詳細說明第一主機10以及第二主機20的運作,請一併參考圖1及圖2,其中圖2係依據本發明一實施例所繪示的虛擬機器備援方法的流程圖。依據本發明一實施例的虛擬機器備援方法由第一主機10執行,如圖2所示,包括:步驟S201:擷取虛擬機器對硬碟映像檔的寫入請求,其中寫入請求包含寫入資料、輸入位置資訊及輸出位置資訊;步驟S203:將寫入資料複製到第一主機的資料暫存區;步驟S205:計算寫入資料的第一鍵值;步驟S207:將第一鍵值、輸入位置資訊及輸出位置資訊存入第一資源位置結構;步驟S209:暫停虛擬機器的運作,並根據第一資源位置結構及判斷第一鍵值與對應於輸入位置資訊的第二鍵值的比較結果產生第二資源位置結構,其中第二鍵值對應於資料暫存區中的既存資料;以及步驟S211:根據第二資源位置結構輸出備援資料組至第二主機,以供第二主機產生虛擬機器的副本及硬碟映像檔的副本,其中當第一鍵值與第二鍵值相同時,備援資料組包含第二資源位置結構以及既存資料與寫入資料中的僅一者。In order to describe the operations of the first host 10 and the second host 20 in more detail, please refer to FIG. 1 and FIG. 2 together, wherein FIG. 2 is a flow chart of a virtual machine backup method according to an embodiment of the present invention. The virtual machine backup method according to an embodiment of the present invention is executed by the first host 10, as shown in Figure 2, including: Step S201: Acquire the virtual machine's writing request for the hard disk image file, where the writing request includes writing Input data, input location information and output location information; Step S203: Copy the written data to the data temporary storage area of the first host; Step S205: Calculate the first key value of the written data; Step S207: Copy the first key value , the input location information and the output location information are stored in the first resource location structure; Step S209: Pause the operation of the virtual machine, and determine the relationship between the first key value and the second key value corresponding to the input location information based on the first resource location structure. The comparison result generates a second resource location structure, in which the second key value corresponds to the existing data in the data temporary storage area; and step S211: output the backup data set to the second host according to the second resource location structure for use by the second host Generate a copy of the virtual machine and a copy of the hard disk image file, wherein when the first key value and the second key value are the same, the backup data set includes the second resource location structure and only one of the existing data and the written data.

當虛擬機器備援系統1啟用後,於熱備援模式下可透過增量背景備份方式持續於第二主機20建立最新的虛擬機器副本,此時的虛擬機器備援系統1於第一主機10的背景會做機遇性備份及傳送部分資料。當虛擬機器備援系統1判斷第二主機20的虛擬機器副本需更新時,虛擬機器備援系統1將暫停第一主機10,以取得第一主機10當下一致的處理器內部資料、記憶體與硬碟狀態,將自第一主機10取得的所有資料(包含處理器內部資料、記憶體與硬碟狀態)傳送到第二主機20,第二主機20接收第一主機10的完整所有資料即可還原到此時間點(此取得當下一致的狀態的動作一般稱作建立檢查點)。為了將寫入請求備份到第一資料暫存區104做進一步處理,故使用代理模組106來代理第一虛擬機器101對第一硬碟105的硬碟映像檔寫入,並擷取該寫入請求的資料內容,將其複製到第一資料暫存區104。故虛擬機器備援系統1於建立檢查點後將執行複製第一硬碟105寫入請求,即步驟S201,第一主機10的代理模組106擷取第一虛擬機器101對第一硬碟105的硬碟映像檔的寫入請求,其中寫入請求至少包含寫入資料、輸入位置資訊及輸出位置資訊。寫入資料為第一虛擬機器101請求對第一硬碟105的硬碟映像檔寫入的資料內容,輸入位置資訊為產生寫入資料的第一虛擬機器101的記憶體位置,輸出位置資訊為第一虛擬機器101請求於第一硬碟105的硬碟映像檔進行寫入的位置或位移資訊。簡言之,寫入資料為待寫入的資料,輸入位置資訊為寫入資料的來源位置,輸出位置資訊為寫入資料的目標位置或寫入資料於硬碟映像檔之位移。After the virtual machine backup system 1 is activated, the latest virtual machine copy can be continuously created on the second host 20 through incremental background backup in the hot backup mode. At this time, the virtual machine backup system 1 is on the first host 10 The background will do opportunistic backups and transfer some data. When the virtual machine backup system 1 determines that the virtual machine copy of the second host 20 needs to be updated, the virtual machine backup system 1 will suspend the first host 10 to obtain the current consistent internal processor data, memory and data of the first host 10 Hard disk status: transmit all data (including processor internal data, memory and hard disk status) obtained from the first host 10 to the second host 20, and the second host 20 receives all complete data from the first host 10 Restore to this point in time (this action of obtaining a consistent state is generally called establishing a checkpoint). In order to back up the write request to the first data temporary storage area 104 for further processing, the proxy module 106 is used to proxy the first virtual machine 101 to write the hard disk image file of the first hard disk 105 and retrieve the write request. Enter the requested data content and copy it to the first data temporary storage area 104. Therefore, after establishing the checkpoint, the virtual machine backup system 1 will execute a copy of the write request of the first hard disk 105, that is, step S201. The agent module 106 of the first host 10 captures the first virtual machine 101's copy of the first hard disk 105. A write request for a hard disk image file, where the write request at least includes write data, input location information, and output location information. The written data is the data content requested by the first virtual machine 101 to be written to the hard disk image file of the first hard disk 105. The input location information is the memory location of the first virtual machine 101 that generates the written data. The output location information is The first virtual machine 101 requests position or displacement information for writing in the hard disk image file of the first hard disk 105 . In short, the written data is the data to be written, the input location information is the source location of the written data, and the output location information is the target location of the written data or the displacement of the written data in the hard disk image file.

於步驟S203,代理模組106將寫入資料複製到第一資料暫存區104。具體而言,第一資料暫存區104可包括記憶體區塊及硬碟映像檔區塊,記憶體區塊用於暫存寫入資料的輸入位置資訊(例如,記憶體位址)、資料大小及資料位址;硬碟映像檔區塊用於暫存寫入資料。代理模組106可以是以稀疏檔案(sparse file)的形式,將寫入資料存入第一資料暫存區104的硬碟映像檔區塊。因此,在第一資料暫存區104中,只有寫入資料被分配到儲存空間,第一資料暫存區104中硬碟映像檔區塊其餘的儲存空間則為空(empty)的空洞(hole),如此可減少記憶體空間使用。代理模組在存入寫入資料時會覆蓋第一資料暫存區104的硬碟映像檔區塊中的歷史寫入資料,因此,當第一虛擬機器101對第一硬碟105的映像檔的同一範圍進行重複寫入時,可以避免記錄到過時的多餘資料。於步驟S203,代理模組106可同時將寫入資料寫入第一硬碟105的硬碟映像檔。第一資料同步模組102可將經壓縮的第一虛擬機器101的記憶體變更內容存入第一資料暫存區104,以及將記憶體變更內容對應的鍵值存入第一資料暫存區104。透過步驟S203的暫存機制,當虛擬機器備援系統1為建立檢查點而須停止第一虛擬機器101以確保資料一致性時,將無須再次從第一硬碟105的硬碟映像檔讀取資料,而是使用第一資料暫存區104硬碟映像檔區塊的副本。可加速第一虛擬機器101暫停時取得硬碟映像檔同步資料的流程。In step S203, the agent module 106 copies the written data to the first data temporary storage area 104. Specifically, the first data temporary storage area 104 may include a memory block and a hard disk image file block. The memory block is used to temporarily store the input location information (for example, memory address) and data size of the written data. and data address; the hard disk image file block is used to temporarily store written data. The agent module 106 may store the written data in the hard disk image file block of the first data temporary storage area 104 in the form of a sparse file. Therefore, in the first data temporary storage area 104, only the written data is allocated to the storage space, and the remaining storage space of the hard disk image file block in the first data temporary storage area 104 is an empty hole. ), which can reduce memory space usage. When the agent module stores the written data, it will overwrite the historical written data in the hard disk image file block of the first data temporary storage area 104. Therefore, when the first virtual machine 101 stores the image file of the first hard disk 105, When repeatedly writing the same range, you can avoid recording outdated redundant data. In step S203, the agent module 106 may write the write data into the hard disk image file of the first hard disk 105 at the same time. The first data synchronization module 102 can store the compressed memory change content of the first virtual machine 101 into the first data temporary storage area 104, and store the key value corresponding to the memory change content into the first data temporary storage area. 104. Through the temporary storage mechanism in step S203, when the virtual machine backup system 1 needs to stop the first virtual machine 101 to establish a checkpoint to ensure data consistency, it will not need to read the hard disk image file from the first hard disk 105 again. data, but uses a copy of the hard disk image file block in the first data temporary storage area 104. The process of obtaining hard disk image file synchronization data when the first virtual machine 101 is suspended can be accelerated.

於步驟S205,代理模組106將寫入資料映射成固定大小的值以取得第一鍵值。舉例而言,代理模組106可以對寫入資料進行雜湊運算,並將產生的雜湊值作為第一鍵值。第一鍵值可視為是寫入請求的識別碼,用於代表寫入資料、輸入位置資訊及輸出位置資訊。In step S205, the proxy module 106 maps the written data into a fixed-size value to obtain the first key value. For example, the agent module 106 can perform a hash operation on the written data and use the generated hash value as the first key value. The first key value can be regarded as the identification code of the write request, which is used to represent the written data, input location information and output location information.

於步驟S207,第一資源管理模組103包含去重複子模組並從代理模組106接收第一鍵值,並將第一鍵值、輸入位置資訊及輸出位置資訊存入第一資源位置結構。第一資源位置結構可以記錄各寫入請求的輸入位置資訊、輸出位置資訊以及鍵值之間的對應關係。具體而言,第一資源位置結構可以鍵-值(key-value)結構實現,例如雜湊表(hash table)、二元樹(binary tree)等方式實現,本發明不予以為限。在本文中,第一鍵值及下述的第二鍵值及第三鍵值指的是鍵-值結構中的「鍵(key)」,而寫入資料、輸入位置資訊及輸出位置資訊可視為鍵-值結構中的「值(value)」。In step S207, the first resource management module 103 includes a deduplication sub-module and receives the first key value from the proxy module 106, and stores the first key value, input location information and output location information into the first resource location structure. . The first resource location structure can record the correspondence between input location information, output location information and key values of each write request. Specifically, the first resource location structure can be implemented in a key-value structure, such as a hash table, a binary tree, etc. The present invention is not limited thereto. In this article, the first key value and the following second key value and third key value refer to the "key" in the key-value structure, and writing data, input location information and output location information are visible It is the "value" in the key-value structure.

為便於理解,以下是以表格的方式示例性地表示第一資源位置結構。如下表1所示,假設代理模組106擷取到的寫入請求包括第一輸入位置資訊及第一輸出位置資訊,且寫入請求對應的鍵值為第一鍵值,則第一資源管理模組103可將第一輸入位置資訊填入「輸入位置資訊」的欄位,將第一輸出位置資訊填入「輸出位置資訊」的欄位,以及將第一鍵值填入「鍵值」的欄位。To facilitate understanding, the following is an exemplary representation of the first resource location structure in a table. As shown in Table 1 below, assuming that the write request captured by the proxy module 106 includes the first input location information and the first output location information, and the key value corresponding to the write request is the first key value, then the first resource management Module 103 can fill in the first input location information into the "input location information" field, fill in the first output location information into the "output location information" field, and fill in the first key value into the "key value" field.

表1 輸入位置資訊 輸出位置資訊 鍵值 第一輸入位置資訊 第一輸出位置資訊 第一鍵值 Table 1 Enter location information Output location information key value First input location information First output location information first key value

第一虛擬機器101內的客體(guest)作業系統會持續變更記憶體內容及第一硬碟105中的硬碟映像檔。因此,於步驟S209,第一主機10需暫停第一虛擬機器101的運作,以儲存在這個時間點的最終版本的記憶體內容、第一硬碟105中的硬碟映像檔及處理器狀態等。The guest operating system in the first virtual machine 101 will continuously change the memory content and the hard disk image file in the first hard disk 105 . Therefore, in step S209, the first host 10 needs to suspend the operation of the first virtual machine 101 to store the final version of the memory content at this point in time, the hard disk image file and processor status in the first hard disk 105, etc. .

在暫停第一虛擬機器101的運作後,第一資源管理模組103中的去重複子模組根據第一資源管理模組103中的第一資源位置結構以及第一鍵值與對應於前述輸入位置資訊的第二鍵值之間的比對結果產生第二資源位置結構。詳言之,第二鍵值是對第一資料暫存區104中的既存資料映射成固定大小的值,且第二鍵值可以是儲存在第一資料暫存區104中,其中既存資料的產生時間點晚於第一虛擬機器101輸出寫入請求的時間點。既存資料可以是第一主機10的第一資料同步模組102隨機或定期地壓縮對應輸入位置資訊的原始資料而產生,即既存資料可以是第一資料同步模組102壓縮前述來源記憶體位置的原始資料而產生。換言之,前述存入第一資料暫存區104後的記憶體變更內容可作為既存資料。After suspending the operation of the first virtual machine 101, the deduplication sub-module in the first resource management module 103 determines the corresponding input according to the first resource location structure and the first key value in the first resource management module 103. The comparison result between the second key values of the location information generates a second resource location structure. Specifically, the second key value maps the existing data in the first data temporary storage area 104 to a fixed-size value, and the second key value may be stored in the first data temporary storage area 104, in which the existing data The generation time point is later than the time point when the first virtual machine 101 outputs the write request. The existing data may be generated by the first data synchronization module 102 of the first host 10 randomly or regularly compressing the original data corresponding to the input location information. That is, the existing data may be generated by the first data synchronization module 102 compressing the aforementioned source memory location. generated from original data. In other words, the aforementioned memory modification content after being stored in the first data temporary storage area 104 can be used as existing data.

所述比較結果指示第一鍵值與第二鍵值彼此相同或不同。因此,於步驟S209,第一資源管理模組103中的去重複子模組基於比較結果及第一資源位置結構產生第二資源位置結構,並且可將第二資源位置結構存入第一資源管理模組103。換言之,第一主機10可將第一資源位置結構的至少一部分作為第二資源位置結構,且所述至少一部分包括第一鍵值、輸入位置資訊以及輸出位置資訊,透過步驟S209將第一資料暫存區104的資料去重複可節省網路頻寬、達到高即時性,提升至毫秒等級備援的同步效率。The comparison result indicates that the first key value and the second key value are the same as or different from each other. Therefore, in step S209, the deduplication sub-module in the first resource management module 103 generates a second resource location structure based on the comparison result and the first resource location structure, and can store the second resource location structure in the first resource management Mod 103. In other words, the first host 10 can use at least part of the first resource location structure as the second resource location structure, and the at least part includes the first key value, the input location information and the output location information, and temporarily transfers the first data to the first resource location structure through step S209. Deduplication of data in storage area 104 can save network bandwidth, achieve high real-time, and improve synchronization efficiency to millisecond level redundancy.

於步驟S211,第一主機10的第一資料同步模組102根據第二資源位置結構輸出備援資料組至第二主機20的第二資料同步模組202,以供第二主機20產生第一虛擬機器101的副本及第一硬碟105的硬碟映像檔的副本,其中當第一鍵值與第二鍵值相同時,備援資料組包含第二資源位置結構以及既存資料與寫入資料中的僅一者。In step S211, the first data synchronization module 102 of the first host 10 outputs the backup data set to the second data synchronization module 202 of the second host 20 according to the second resource location structure for the second host 20 to generate the first A copy of the virtual machine 101 and a copy of the hard disk image file of the first hard disk 105. When the first key value and the second key value are the same, the backup data group includes the second resource location structure and existing data and written data. only one of them.

具體地,請一併參考步驟S209及步驟S211,當比較結果指示第一鍵值與第二鍵值相同時,表示寫入資料與既存資料是重複的資料,第一資源管理模組103直接將第一資源位置結構作為第二資源位置結構,且備援資料組包含既存資料而不包含寫入資料。當比較結果指示第一鍵值與第二鍵值不同時,表示寫入資料與既存資料是不同的資料,第一資源管理模組103移除第一資源位置結構中的輸入位置資訊與輸出位置資訊的對應關係以產生第二資源位置結構。Specifically, please refer to step S209 and step S211 together. When the comparison result indicates that the first key value and the second key value are the same, it means that the written data and the existing data are duplicate data, and the first resource management module 103 directly The first resource location structure serves as the second resource location structure, and the backup data set contains existing data but does not contain written data. When the comparison result indicates that the first key value and the second key value are different, it means that the written data and the existing data are different data, and the first resource management module 103 removes the input location information and output location in the first resource location structure. Correspondence of information to generate a second resource location structure.

因此,於步驟S211,第一資料同步模組102從第一資源管理模組103讀取第二資源位置結構,且若第一鍵值與第二鍵值相同時,第一資料同步模組102根據第二資源位置結構從第一資料暫存區104讀取既存資料。接著,第一資料同步模組102輸出備援資料組至第二資料同步模組202,而不輸出寫入資料,其中備援資料組包括第二資源位置結構及既存資料。換言之,當第一鍵值與第二鍵值相同時,則欲傳送的第二資源位置結構內記錄的是已先儲存過的資料的硬碟位址及記憶體位址,並略過重複的資料內容。Therefore, in step S211, the first data synchronization module 102 reads the second resource location structure from the first resource management module 103, and if the first key value and the second key value are the same, the first data synchronization module 102 Existing data is read from the first data temporary storage area 104 according to the second resource location structure. Then, the first data synchronization module 102 outputs the backup data set to the second data synchronization module 202 without outputting the written data, wherein the backup data set includes the second resource location structure and existing data. In other words, when the first key value and the second key value are the same, the hard disk address and memory address of the previously stored data are recorded in the second resource location structure to be transmitted, and duplicate data is skipped. content.

反之,當第一鍵值與第二鍵值不同時,第一資料同步模組102根據第二資源位置結構從第一資料暫存區104讀取既存資料及寫入資料,使備援資料組包括第二資源位置結構、既存資料及寫入資料,及輸出備援資料組至第二資料同步模組202。On the contrary, when the first key value and the second key value are different, the first data synchronization module 102 reads the existing data from the first data temporary storage area 104 and writes the data according to the second resource location structure, so that the backup data group It includes a second resource location structure, existing data and written data, and outputs a redundant data set to the second data synchronization module 202 .

簡言之,備援資料組可以包含第二資源位置結構、記憶體同步資料暫存區以及硬碟同步資料暫存區中沒有被第二資源位置結構記錄有對應關係的資料。In short, the backup data group may include data in the second resource location structure, the memory synchronization data temporary storage area, and the hard disk synchronization data temporary storage area that are not recorded in the second resource location structure and have no corresponding relationship.

另外,步驟S209中所述的「暫停第一虛擬機器101的運作」可以是第一主機10以固定頻率(例如,每秒2次到每秒200次)暫停第一虛擬機器101的運作;第一主機10以固定時間間隔暫停第一虛擬機器101的運作;第一主機10在第一虛擬機器101處於閒置狀態的時間達預設時間時暫停第一虛擬機器101的運作;或是第一主機10接收使用者的指令而暫停第一虛擬機器101的運作。因此,在步驟S209之前,第一主機10可能已多次擷取及儲存寫入請求(例如,多次執行步驟S201、S203、S205及S207),故第一資源位置結構可以包括多個鍵值、輸入位置資訊及輸出位置資訊的多筆對應關係(例如,表1有多列的資料),其中所述多筆對應關係分別對應於多次寫入請求。因此,步驟S209所述的鍵值的比較可以對第一資源位置結構中的每筆對應關係執行。因記憶體變更內容皆由第一資料同步模組102進行儲存,代理模組106不涉及記憶體變更資料的儲存與鍵值計算,故在第一主機10暫停第一虛擬機器101的運作之前或第一主機10暫停第一虛擬機器101的運作時,第一主機10的第一資料同步模組102更會取得記憶體變更資料,並將記憶體變更資料存入記憶體同步資料暫存區,故此處存入記憶體同步資料暫存區的資料就是既存資料。In addition, "pausing the operation of the first virtual machine 101" described in step S209 may be that the first host 10 pauses the operation of the first virtual machine 101 at a fixed frequency (for example, 2 times per second to 200 times per second); A host 10 suspends the operation of the first virtual machine 101 at a fixed time interval; the first host 10 suspends the operation of the first virtual machine 101 when the first virtual machine 101 is idle for a preset time; or the first host 10 10. Receive the user's instruction to suspend the operation of the first virtual machine 101. Therefore, before step S209, the first host 10 may have retrieved and stored the write request multiple times (for example, executed steps S201, S203, S205 and S207 multiple times), so the first resource location structure may include multiple key values. , multiple correspondences between the input location information and the output location information (for example, Table 1 has multiple columns of data), where the multiple correspondences respectively correspond to multiple write requests. Therefore, the comparison of key values in step S209 can be performed for each correspondence in the first resource location structure. Since the memory change content is stored by the first data synchronization module 102, the agent module 106 does not involve the storage and key value calculation of the memory change data, so before the first host 10 suspends the operation of the first virtual machine 101 or When the first host 10 suspends the operation of the first virtual machine 101, the first data synchronization module 102 of the first host 10 further obtains the memory change data and stores the memory change data into the memory synchronization data temporary storage area. Therefore, the data stored in the memory synchronization data temporary storage area here is the existing data.

第二資料同步模組202在收到備援資料組後,可以將備援資料組的第二資源位置結構存入第二資源管理模組203,以及將備援資料組中的資料存入第二資料暫存區204。因此,第二資料同步模組202可以根據第二資源管理模組203中的第二資源位置結構以及第二資料暫存區204中的資料產生第一虛擬機器101的副本及第一硬碟105的硬碟映像檔的副本。After receiving the backup data group, the second data synchronization module 202 can store the second resource location structure of the backup data group in the second resource management module 203, and store the data in the backup data group into the second resource management module 203. 2. Data temporary storage area 204. Therefore, the second data synchronization module 202 can generate a copy of the first virtual machine 101 and the first hard disk 105 according to the second resource location structure in the second resource management module 203 and the data in the second data temporary storage area 204 A copy of the hard drive image file.

此外,在步驟S211之後,即在第一資料同步模組102輸出備援資料組至第二主機20後,第一資料同步模組102可通知第一資源管理模組103,以由第一資源管理模組103重置第二資源位置結構。換言之,在輸出備援資料組至第二主機20後,第一主機10可清除第二資源位置結構中的內容。In addition, after step S211, that is, after the first data synchronization module 102 outputs the backup data set to the second host 20, the first data synchronization module 102 may notify the first resource management module 103 to use the first resource The management module 103 resets the second resource location structure. In other words, after outputting the backup data set to the second host 20, the first host 10 can clear the contents of the second resource location structure.

此外,同樣在步驟S211之後,第二主機20的第二資料同步模組202可發送確認(ACK)訊號至第一主機10的第一資料同步模組102。第一資料同步模組102在受確認訊號觸發後可運行第一虛擬機器101,以使第一主機10的第一虛擬機器101恢復運行。另外,第二主機20亦可以是在完成對備援資料組的解析,且判斷備援資料組中的第二資源位置結構及既存資料/寫入資料的格式符合系統(例如,第二主機20)的規範格式,以及判斷第二資料暫存區204中存在去重複的資料(即寫入資料)所對應的原始資料後,再發送確認訊號至第一主機10的第一資料同步模組102。In addition, also after step S211, the second data synchronization module 202 of the second host 20 may send an acknowledgment (ACK) signal to the first data synchronization module 102 of the first host 10. The first data synchronization module 102 can run the first virtual machine 101 after being triggered by the confirmation signal, so that the first virtual machine 101 of the first host 10 resumes operation. In addition, the second host 20 may also complete the analysis of the redundant data set and determine that the second resource location structure and the format of the existing data/written data in the redundant data set comply with the system (for example, the second host 20 ), and after determining that the original data corresponding to the deduplicated data (i.e., written data) exists in the second data temporary storage area 204, a confirmation signal is sent to the first data synchronization module 102 of the first host 10 .

另需說明的是,第一資料同步模組102可以是依據資料的儲存位址順序輸出資料,即第一資料同步模組102依據儲存空間上的順序(如記憶體位置由低至高)輸出資料,而非時間上的順序。舉例而言,若第一虛擬機器101的既存資料比其在第一資源位置結構中對應的寫入資料還要早傳送,且該既存資料之第二鍵值尚未被機遇性地計算,或是此既存資料位於臨時清單,則第一資料同步模組102在傳送的同時會計算其第二鍵值,以供後續傳送該寫入資料時,比對寫入資料對應的第一鍵值與此既存資料對應的第二鍵值。It should be noted that the first data synchronization module 102 can output data in sequence according to the storage address of the data, that is, the first data synchronization module 102 outputs data according to the order in the storage space (such as memory location from low to high). , rather than in chronological order. For example, if the existing data of the first virtual machine 101 is transmitted earlier than the corresponding written data in the first resource location structure, and the second key value of the existing data has not yet been opportunistically calculated, or This existing data is in the temporary list, and the first data synchronization module 102 will calculate its second key value while transmitting it, so that when the written data is subsequently transmitted, the first key value corresponding to the written data will be compared with the first key value corresponding to the written data. The second key value corresponding to the existing data.

反之,若第一虛擬機器101的寫入資料比其在第一資源位置結構中對應的既存資料還要早傳送,若該既存資料沒有被機遇性地計算鍵值導致第二鍵值尚未被計算,則使得第一主機10需先計算第二鍵值後才能傳送,進而造成第一主機10的傳輸作業被迫暫停。因此,為了避免上述情況,第一資料同步模組102可將對應此寫入資料之既存資料加入臨時清單,延後此寫入資料的傳送,待該既存資料之第二鍵值計算完成可供比對後才繼續傳送此寫入資料。同時第一資料同步模組102則可以傳送其他寫入資料至第二資料同步模組202。On the contrary, if the written data of the first virtual machine 101 is transmitted earlier than the corresponding existing data in the first resource location structure, if the existing data has not been opportunistically calculated, the second key value has not been calculated. , then the first host 10 needs to calculate the second key value before transmitting, thus causing the transmission operation of the first host 10 to be suspended. Therefore, in order to avoid the above situation, the first data synchronization module 102 can add the existing data corresponding to the written data to the temporary list, delay the transmission of the written data, and wait for the second key value calculation of the existing data to be completed. The written data will be sent after the comparison. At the same time, the first data synchronization module 102 can transmit other written data to the second data synchronization module 202.

在圖2中,步驟S203係繪示為執行在步驟S205之前,但步驟S203亦可執行在步驟S205之後,或步驟S203可與步驟S205被同時執行。另外,步驟S209較佳係執行在步驟S207之後。In FIG. 2 , step S203 is shown as being executed before step S205 , but step S203 may also be executed after step S205 , or step S203 may be executed simultaneously with step S205 . In addition, step S209 is preferably performed after step S207.

請接著一併參考圖1及圖3,其中圖3係依據本發明另一實施例所繪示的虛擬機器備援方法的流程圖。圖3所示的步驟S301、S303及S305可以是執行在圖2的步驟S209中,進一步而言是在步驟S209所述的暫停第一虛擬機器101的運作中。在第一主機10暫停第一虛擬機器101的運作時,第一主機10可以進一步執行:步驟S301:判斷第一資源位置結構中是否存在對應異動的分頁位置資訊;若步驟S301的判斷結果為「是」,執行步驟S303:計算對應分頁位置資訊的資料的第三鍵值以作為第二鍵值;以及若步驟S301的判斷結果為「否」,執行步驟S305:視為第一鍵值與第二鍵值比較結果相同。Please refer to FIG. 1 and FIG. 3 together. FIG. 3 is a flow chart of a virtual machine backup method according to another embodiment of the present invention. Steps S301, S303 and S305 shown in FIG. 3 may be executed in step S209 in FIG. 2, or further in the suspension of the operation of the first virtual machine 101 described in step S209. When the first host 10 suspends the operation of the first virtual machine 101, the first host 10 may further perform: Step S301: Determine whether there is paging location information corresponding to the change in the first resource location structure; if the determination result in step S301 is " "Yes", execute step S303: calculate the third key value corresponding to the data of the paging position information as the second key value; and if the judgment result of step S301 is "no", execute step S305: regard the first key value as the second key value The two key value comparison results are the same.

於步驟S301,第一主機10的第一資源管理模組103判斷第一資源位置結構中是否存在對應異動的分頁位置資訊。具體而言,為了提升檔案存取的效率,作業系統可使用分頁快取的機制將第一硬碟105中的硬碟資料位址映射到第一虛擬機器101的對應輸入位置資訊的記憶體空間中。因此,第一硬碟105中的硬碟資料與部分的記憶體空間中的資料實際上相同。In step S301, the first resource management module 103 of the first host 10 determines whether there is paging location information corresponding to the transaction in the first resource location structure. Specifically, in order to improve the efficiency of file access, the operating system can use a paging cache mechanism to map the hard disk data address in the first hard disk 105 to the memory space of the first virtual machine 101 corresponding to the input location information. middle. Therefore, the hard disk data in the first hard disk 105 and the data in part of the memory space are actually the same.

當對應輸入位置資訊的記憶體空間中的原始資料被第一主機10的作業系統修改,且第一資源位置結構中存在此原始資料的輸入位置資訊、輸出位置資訊以及鍵值之間的對應關係時,第一資源位置結構中的輸入位置資訊便產生所述異動,而被修改的原始資料的記憶體位址即為對應異動的分頁位置資訊。需說明的是,第一資源位置結構中的異動可以文字、符號等標記的方式實現,本發明不予以限制。When the original data in the memory space corresponding to the input location information is modified by the operating system of the first host 10, and there is a corresponding relationship between the input location information, output location information and key values of the original data in the first resource location structure At this time, the input location information in the first resource location structure generates the change, and the memory address of the modified original data is the paging location information corresponding to the change. It should be noted that the change in the first resource location structure can be implemented in the form of text, symbols and other marks, which is not limited by the present invention.

若第一資源位置結構中存在對應異動的分頁位置資訊,則於步驟S303,第一主機10對異動的分頁位置資訊的原始資料、輸入位置資訊及輸出位置資訊映射成固定大小的值以取得第三鍵值,並以第三鍵值作為前述的第二鍵值。反之,若第一資源位置結構中不存在對應異動的分頁位置資訊,則於步驟S305,視為第一鍵值與第二鍵值比較結果相同,以產生圖2的步驟S209所述的第一鍵值與第二鍵值的比較結果。If there is paging position information corresponding to the change in the first resource position structure, then in step S303, the first host 10 maps the original data, input position information and output position information of the changed paging position information into fixed-size values to obtain the first Three key values, and use the third key value as the aforementioned second key value. On the contrary, if there is no paging location information corresponding to the transaction in the first resource location structure, then in step S305, the comparison result of the first key value and the second key value is deemed to be the same, so as to generate the first key value described in step S209 of Figure 2 The comparison result of the key value with the second key value.

另外,在判斷第一資源位置結構中是否存在對應異動的分頁位置資訊之前,第一主機10的代理模組106可先將第一虛擬機器101的分頁位置資訊作為輸入位置資訊。因此,代理模組106可依據分頁位置資訊查找第一虛擬機器101的記憶體,進而較快速地找出第一虛擬機器101的記憶體中與寫入資料相符的部分。In addition, before determining whether there is paging location information corresponding to the transaction in the first resource location structure, the agent module 106 of the first host 10 may first use the paging location information of the first virtual machine 101 as input location information. Therefore, the agent module 106 can search the memory of the first virtual machine 101 based on the paging location information, and then more quickly find the portion of the memory of the first virtual machine 101 that is consistent with the written data.

請接著一併參考圖1及圖4,其中圖4係依據本發明又一實施例所繪示的虛擬機器備援方法的流程圖。本實施例的虛擬機器備援方法除了圖2所示的步驟,更在第一資料同步模組102輸出備援資料組至第二資料同步模組202(圖2步驟S211)後,包含由第二主機20執行:步驟S401:判斷第二資源位置結構中具有對應關係的輸入位置資訊及輸出位置資訊;步驟S403:依據去重複資料產生還原資料,其中去重複資料為備援資料組中的既存資料或寫入資料;步驟S405:至少依據去重複資料及輸入位置資訊產生虛擬機器的副本;以及步驟S407:至少依據還原資料及輸出位置資訊產生硬碟映像檔的副本。Please refer to FIG. 1 and FIG. 4 together. FIG. 4 is a flow chart of a virtual machine backup method according to another embodiment of the present invention. In addition to the steps shown in FIG. 2 , the virtual machine backup method of this embodiment also includes a step 102 after the first data synchronization module 102 outputs the backup data set to the second data synchronization module 202 (step S211 in FIG. 2 ). The second host 20 executes: Step S401: Determine the corresponding input location information and output location information in the second resource location structure; Step S403: Generate restoration data based on the deduplication data, where the deduplication data is existing in the backup data group. data or write data; step S405: generate a copy of the virtual machine based on at least deduplication data and input location information; and step S407: generate a copy of the hard disk image file based on at least restoration data and output location information.

在接收備援資料組後,第二資料同步模組202解析備援資料組,將備援資料組中的第二資源位置結構存入第二資源管理模組203,以及根據備援資料組中的第二資源位置結構將既存資料/寫入資料存入第二資料暫存區204。因此,於步驟S401,第二資源管理模組203可判斷第二資源位置結構中具有對應關係的輸入位置資訊與輸出位置資訊,其中此對應關係代表第一鍵值與該第二鍵值相同。After receiving the backup data set, the second data synchronization module 202 parses the backup data set, stores the second resource location structure in the backup data set into the second resource management module 203, and stores the second resource location structure in the backup data set according to the backup data set. The second resource location structure stores the existing data/written data into the second data temporary storage area 204. Therefore, in step S401, the second resource management module 203 can determine the input location information and the output location information that have a corresponding relationship in the second resource location structure, where the corresponding relationship represents that the first key value and the second key value are the same.

在判斷具有對應關係的輸入位置資訊與輸出位置資訊後,於步驟S403,第二資料同步模組202複製去重複資料中的既存資料以產生還原資料。於步驟S405,第二資料同步模組202依據去重複資料中的既存資料及輸入位置資訊產生第一虛擬機器101的記憶體變更資料的副本,並將第一虛擬機器101的記憶體變更資料的副本寫入第二虛擬機器201的記憶體。於步驟S407,第二資料同步模組202依據還原資料及輸出位置資訊產生第一硬碟105的硬碟映像檔的變更資料的副本,並將第一硬碟105的硬碟映像檔的變更資料的副本寫入第二硬碟205。After determining the corresponding input position information and output position information, in step S403, the second data synchronization module 202 copies the existing data in the deduplicated data to generate restored data. In step S405, the second data synchronization module 202 generates a copy of the memory change data of the first virtual machine 101 based on the existing data in the deduplication data and the input location information, and saves the memory change data of the first virtual machine 101. The copy is written into the memory of the second virtual machine 201 . In step S407, the second data synchronization module 202 generates a copy of the modified data of the hard disk image file of the first hard disk 105 based on the restored data and the output location information, and converts the modified data of the hard disk image file of the first hard disk 105 to A copy is written to the second hard disk 205.

簡言之,於步驟S403,第二資料同步模組202根據第二資源位置結構將既存資料還原成還原資料;於步驟S405,第二資料同步模組202至少依據既存資料及輸入位置資訊產生第一虛擬機器101的副本,並將第一虛擬機器101的副本寫入第二虛擬機器201的記憶體,以由第二虛擬機器201還原第一虛擬機器101的運作狀態;以及於步驟S407,第二資料同步模組202至少依據還原資料及輸出位置資訊產生第一硬碟105的硬碟映像檔的副本,並將第一硬碟105的硬碟映像檔的副本寫入第二硬碟205,以由第二硬碟205還原第一硬碟105的運作狀態。In short, in step S403, the second data synchronization module 202 restores the existing data to restored data according to the second resource location structure; in step S405, the second data synchronization module 202 generates the first data based on at least the existing data and the input location information. A copy of the virtual machine 101, and writing the copy of the first virtual machine 101 into the memory of the second virtual machine 201, so that the second virtual machine 201 restores the operating state of the first virtual machine 101; and in step S407, The second data synchronization module 202 generates a copy of the hard disk image file of the first hard disk 105 based on at least the restoration data and the output location information, and writes the copy of the hard disk image file of the first hard disk 105 to the second hard disk 205, The operating status of the first hard disk 105 is restored from the second hard disk 205 .

進一步而言,當備援資料組包含未記錄於第二資源位置結構的對應關係中的其他資料(後稱剩餘資料)時,第二資料同步模組202所產生的副本更可以是依據剩餘資料。具體地,第二資料同步模組202可根據對應於記憶體同步資料暫存區的剩餘資料產生第一虛擬機器101的副本的一部分,且可根據對應於硬碟同步資料暫存區的剩餘資料產生第一硬碟105的硬碟映像檔的副本。Furthermore, when the backup data set includes other data that is not recorded in the corresponding relationship of the second resource location structure (hereinafter referred to as remaining data), the copy generated by the second data synchronization module 202 may be based on the remaining data. . Specifically, the second data synchronization module 202 can generate a part of the copy of the first virtual machine 101 based on the remaining data corresponding to the memory synchronization data temporary storage area, and can generate a part of the copy of the first virtual machine 101 based on the remaining data corresponding to the hard disk synchronization data temporary storage area. A copy of the hard disk image file of the first hard disk 105 is generated.

另外,第二主機20在收到備援資料組後,第二虛擬機器201可透過無回報的(gratuitous)位址解析協定(address resolution protocol,ARP)向第一主機10所連接的網路宣告第一虛擬機器101的新的位置(即第二虛擬機器201的位置),使連接於第一主機10的其他主機及/或網路設備的位址解析協定表格可以被更新,進而接續第一主機10的第一虛擬機器101的運作。In addition, after the second host 20 receives the backup data set, the second virtual machine 201 can announce to the network connected to the first host 10 through a gratuitous address resolution protocol (ARP). The new location of the first virtual machine 101 (that is, the location of the second virtual machine 201) allows the address resolution protocol tables of other hosts and/or network devices connected to the first host 10 to be updated, and then continue the first Operation of the first virtual machine 101 of the host 10 .

在圖4中,步驟S405係繪示為執行在步驟S407之前,但步驟S405亦可執行在步驟S407之後,或步驟S405可與步驟S407被同時執行。In FIG. 4 , step S405 is shown as being executed before step S407, but step S405 may also be executed after step S407, or step S405 may be executed simultaneously with step S407.

在實際應用時,當第一虛擬機器101暫停運作並輸出備援資料組至第二主機20,但第二主機20未能接手第一主機10的網路連線時,第二主機20可先計時並判斷是否逾時(timeout)。當第二主機20判斷逾時的狀況發生時,第二主機20可基於第一虛擬機器101的副本接手第一虛擬機器101的運作,及基於第一硬碟105的硬碟映像檔的副本接手第一硬碟105的運作。In practical applications, when the first virtual machine 101 suspends operation and outputs the backup data set to the second host 20, but the second host 20 fails to take over the network connection of the first host 10, the second host 20 can first Timer and determine whether timeout occurs. When the second host 20 determines that a timeout occurs, the second host 20 can take over the operation of the first virtual machine 101 based on the copy of the first virtual machine 101 and the copy of the hard disk image file of the first hard disk 105 . Operation of the first hard disk 105.

此外,第二主機20可對第一主機10在傳送備援資料組時的狀態進行檢查,以避免第一虛擬機器101及第二虛擬機器102同時運作而導致的核心分裂(或稱腦裂(split-brain))的狀況。舉例而言,第二主機20可對第一主機10傳送的連線進行活性(active)監測;第二主機20與第一主機10之間可有共享的暫時儲存空間,而第二主機20可檢測與第一主機10在此暫時儲存空間的溝通情況;或第二主機20可透過心跳(heartbeat)機制檢查與第一主機10之間的網路連線。In addition, the second host 20 can check the status of the first host 10 when transmitting the redundant data set to avoid core split (or split brain) caused by the first virtual machine 101 and the second virtual machine 102 operating at the same time. split-brain)) status. For example, the second host 20 can perform active monitoring on the connection transmitted by the first host 10; there can be a shared temporary storage space between the second host 20 and the first host 10, and the second host 20 can Detect the communication status with the first host 10 in the temporary storage space; or the second host 20 can check the network connection with the first host 10 through a heartbeat mechanism.

請參考下表2,其中表2示出了本案能夠提升同步效率及降低傳輸備援資料所需的網路頻寬的佐證資料,並以正在執行資料庫壓力測試(例如,TPC-C)的虛擬機器作為圖1所示的第一虛擬機器101,及將第一主機10暫停第一虛擬機器101的運作的固定時間間隔設定為60秒。Please refer to Table 2 below, which shows evidence that this case can improve synchronization efficiency and reduce the network bandwidth required to transmit redundant data, and is based on the database stress test (for example, TPC-C) being performed. The virtual machine is the first virtual machine 101 shown in FIG. 1 , and the fixed time interval for the first host 10 to pause the operation of the first virtual machine 101 is set to 60 seconds.

如表2所示,相較於先前技術,依據本案實施例的虛擬機器備援方法及系統,產生備援資料的平均時間降低了約75%,備援資料的平均大小降低了約89%。因此,從表2可知,依據本案實施例的虛擬機器備援方法及系統有效減少產生備援資料所需的時間,及有效減少傳輸備援資料組所需的頻寬。As shown in Table 2, compared with the previous technology, according to the virtual machine backup method and system of the embodiment of this case, the average time to generate backup data is reduced by approximately 75%, and the average size of backup data is reduced by approximately 89%. Therefore, it can be seen from Table 2 that the virtual machine backup method and system according to the embodiment of the present case effectively reduce the time required to generate backup data and effectively reduce the bandwidth required to transmit the backup data set.

表2   產生備援資料的平均時間(毫秒) 備援資料的平均大小(MB) 先前技術 3403 2433 本案技術 825 269 Table 2 Average time to generate backup data (milliseconds) Average size of backup data (MB) prior art 3403 2433 Technology in this case 825 269

綜上所述,依據本發明一或多個實施例所示的虛擬機器備援方法及系統,可以即時地擷取虛擬機器的運作資料,且透過對寫入資料進行去重複,可以降低傳輸備援資料組所需的網路頻寬及所需的時間,達到毫秒等級的備援。另外,透過擷取及暫存第一鍵值、輸入位置資訊及輸出位置資訊存入第一資源位置結構的機制,當後續第一主機需暫停第一虛擬機器的運作時,第一主機不需再次從第一硬碟的硬碟映像檔讀取資料,而是可使用第一資源位置結構及/或第一資料暫存區中的資料。因此,可以加速暫停第一虛擬機器以取得備援資料組的流程。依據本發明一或多個實施例所示的虛擬機器備援方法及系統可以適用於本地端機房或異地端機房的虛擬機器備援情境。此外,當異地端機房間是處於低頻寬環境下時,也可以有更佳的目標還原點(recovery point,RPO),以減少損失資料。此外,透過檢查第一主機在傳送備援資料組時的狀態,可避免核心分裂(或稱腦裂)的狀況。In summary, according to the virtual machine backup method and system shown in one or more embodiments of the present invention, the operating data of the virtual machine can be captured in real time, and by deduplicating the written data, the transmission backup time can be reduced. The network bandwidth and time required to restore the data group can reach millisecond level backup. In addition, through the mechanism of retrieving and temporarily storing the first key value, input location information, and output location information into the first resource location structure, when the first host subsequently needs to suspend the operation of the first virtual machine, the first host does not need to The data is read from the hard disk image file of the first hard disk again, but the data in the first resource location structure and/or the first data temporary storage area can be used. Therefore, the process of suspending the first virtual machine to obtain the backup data set can be accelerated. The virtual machine backup method and system shown in one or more embodiments of the present invention can be applied to a virtual machine backup scenario in a local computer room or a remote computer room. In addition, when the remote computer room is in a low-bandwidth environment, a better recovery point (RPO) can be set to reduce data loss. In addition, by checking the status of the primary host when transmitting the redundant data set, a split-core (or split-brain) situation can be avoided.

雖然本發明以前述之實施例揭露如上,然其並非用以限定本發明。在不脫離本發明之精神和範圍內,所為之更動與潤飾,均屬本發明之專利保護範圍。關於本發明所界定之保護範圍請參考所附之申請專利範圍。Although the present invention is disclosed in the foregoing embodiments, they are not intended to limit the present invention. All changes and modifications made without departing from the spirit and scope of the present invention shall fall within the scope of patent protection of the present invention. Regarding the protection scope defined by the present invention, please refer to the attached patent application scope.

S201,S203,S205,S207,S209,S211,S301,S303,S305,S401,S403,S405,S407,S409:步驟 1:虛擬機器備援系統 10:第一主機 101:第一虛擬機器 102:第一資料同步模組 103:第一資源管理模組 104:第一資料暫存區 105:第一硬碟 106:代理模組 20:第二主機 201:第二虛擬機器 202:第二資料同步模組 203:第二資源管理模組 204:第二資料暫存區 205:第二硬碟S201, S203, S205, S207, S209, S211, S301, S303, S305, S401, S403, S405, S407, S409: Steps 1: Virtual machine backup system 10:First host 101: First virtual machine 102: First data synchronization module 103:The first resource management module 104: First data temporary storage area 105:First hard drive 106:Agent module 20: Second host 201: Second virtual machine 202: Second data synchronization module 203: Second resource management module 204: Second data temporary storage area 205: Second hard drive

圖1係依據本發明一實施例所繪示的虛擬機器備援系統的方塊圖。 圖2係依據本發明一實施例所繪示的虛擬機器備援方法的流程圖。 圖3係依據本發明另一實施例所繪示的虛擬機器備援方法的流程圖。 圖4係依據本發明又一實施例所繪示的虛擬機器備援方法的流程圖。 FIG. 1 is a block diagram of a virtual machine backup system according to an embodiment of the present invention. FIG. 2 is a flow chart of a virtual machine backup method according to an embodiment of the present invention. FIG. 3 is a flow chart of a virtual machine backup method according to another embodiment of the present invention. FIG. 4 is a flow chart of a virtual machine backup method according to another embodiment of the present invention.

S201,S203,S205,S207,S209,S211:步驟 S201, S203, S205, S207, S209, S211: steps

Claims (18)

一種虛擬機器備援方法,包含以一第一主機執行: 擷取一虛擬機器對一硬碟映像檔的一寫入請求,其中該寫入請求包含一寫入資料、一輸入位置資訊及一輸出位置資訊;將該寫入資料複製到該第一主機的一資料暫存區;計算該寫入資料的一第一鍵值;將該第一鍵值、該輸入位置資訊及該輸出位置資訊存入一第一資源位置結構;暫停該虛擬機器的運作,並根據該第一資源位置結構及判斷該第一鍵值與對應於該輸入位置資訊的一第二鍵值的比較結果產生一第二資源位置結構,其中該第二鍵值對應於該資料暫存區中的一既存資料;以及根據該第二資源位置結構輸出一備援資料組至一第二主機,以供該第二主機產生該虛擬機器的副本及該硬碟映像檔的副本,其中當該第一鍵值與該第二鍵值相同時,該備援資料組包含該第二資源位置結構以及該既存資料與該寫入資料中的僅一者。 A virtual machine backup method includes executing with a first host: Retrieve a write request from a virtual machine to a hard disk image file, wherein the write request includes a write data, an input location information, and an output location information; copy the write data to the first host a data temporary storage area; calculate a first key value of the written data; store the first key value, the input location information and the output location information into a first resource location structure; suspend the operation of the virtual machine, And generate a second resource location structure based on the first resource location structure and the comparison result of the first key value and a second key value corresponding to the input location information, wherein the second key value corresponds to the data temporary an existing data in the storage area; and output a redundant data group to a second host according to the second resource location structure, so that the second host can generate a copy of the virtual machine and a copy of the hard disk image file, wherein When the first key value is the same as the second key value, the backup data set includes the second resource location structure and only one of the existing data and the written data. 如請求項1所述的虛擬機器備援方法,更包含: 以該第一主機壓縮對應該輸入位置資訊的一原始資料以產生該既存資料。 The virtual machine backup method as described in request 1 further includes: The first host compresses a raw data corresponding to the input location information to generate the existing data. 如請求項1所述的虛擬機器備援方法,其中將該寫入資料複製到該第一主機的該資料暫存區包含: 以一稀疏檔案格式將該寫入請求存入該第一主機的該資料暫存區。 The virtual machine backup method as described in claim 1, wherein copying the written data to the data temporary storage area of the first host includes: The write request is stored in the data temporary storage area of the first host in a sparse file format. 如請求項1所述的虛擬機器備援方法,其中在暫停該虛擬機器的該運作時,更包含: 判斷該第一資源位置結構中是否存在對應一異動的一分頁位置資訊;以及當該第一資源位置結構中存在對應該異動的該分頁位置資訊時,計算對應該分頁位置資訊的資料的一第三雜湊值以作為該第二鍵值。 The virtual machine backup method as described in request 1, when suspending the operation of the virtual machine, further includes: Determine whether there is a paging position information corresponding to a change in the first resource position structure; and when there is a paging position information corresponding to the change in the first resource position structure, calculate a first data corresponding to the paging position information. Three hash values are used as the second key value. 如請求項4所述的虛擬機器備援方法,其中在判斷該第一資源位置結構中是否存在對應該異動的該分頁位置資訊之前,該方法包含: 將該虛擬機器的該分頁位置資訊作為該輸入位置資訊。 The virtual machine backup method as described in request 4, wherein before determining whether there is the paging location information corresponding to the change in the first resource location structure, the method includes: Use the paging location information of the virtual machine as the input location information. 如請求項1所述的虛擬機器備援方法,其中該第一資源位置結構包含該輸入位置資訊與該輸出位置資訊之間的一對應關係,該方法更包含: 當該第一鍵值與該第二鍵值不同時,移除該資源位置結構中的該輸入位置資訊與該輸出位置資訊的該對應關係以產生該第二資源位置結構,其中該備援資料組包含該第二資源位置結構、該既存資料及該寫入資料。 The virtual machine backup method as described in claim 1, wherein the first resource location structure includes a corresponding relationship between the input location information and the output location information, and the method further includes: When the first key value is different from the second key value, the corresponding relationship between the input location information and the output location information in the resource location structure is removed to generate the second resource location structure, wherein the backup data The group includes the second resource location structure, the existing data and the written data. 如請求項1所述的虛擬機器備援方法,其中該虛擬機器係一第一虛擬機器,該資料暫存區係一第一資料暫存區,於輸出該備援資料組至該第二主機後,該方法更包含以該第二主機執行: 當該第二資源位置結構包含該輸入位置資訊及該輸出位置資訊之間的一對應關係時,依據一去重複資料產生一還原資料,其中該去重複資料為該備援資料組中的該既存資料或該寫入資料;至少依據該去重複資料及該輸入位置資訊產生該虛擬機器的該副本;以及至少依據該還原資料及該輸出位置資訊產生該硬碟映像檔的該副本。 The virtual machine backup method as described in claim 1, wherein the virtual machine is a first virtual machine, the data temporary storage area is a first data temporary storage area, and the backup data group is output to the second host Finally, the method further includes executing on the second host: When the second resource location structure includes a corresponding relationship between the input location information and the output location information, a restoration data is generated based on a deduplication data, wherein the deduplication data is the existing data in the backup data group. data or the written data; generating the copy of the virtual machine based on at least the deduplication data and the input location information; and generating the copy of the hard disk image file based on at least the restore data and the output location information. 如請求項1所述的虛擬機器備援方法,其中於輸出該備援資料組至該第二主機後,該方法更包含: 以該第一主機受該第二主機輸出的一確認訊號觸發而運行該虛擬機器。 The virtual machine backup method as described in request 1, wherein after outputting the backup data set to the second host, the method further includes: The first host is triggered by a confirmation signal output by the second host to run the virtual machine. 如請求項1所述的虛擬機器備援方法,其中於輸出該備援資料組至該第二主機後,該方法更包含:重置該第二資源位置結構。The virtual machine backup method of claim 1, wherein after outputting the backup data set to the second host, the method further includes: resetting the second resource location structure. 一種虛擬機器備援系統,包含: 一第一主機,包含一虛擬機器、一資料暫存區以及一硬碟映像檔,該虛擬機器連接於該資料暫存區,該第一主機用於輸出一備援資料組;以及一第二主機,連接於該第一主機,該第二主機用於接收該備援資料組,以及產生該虛擬機器的副本及該硬碟映像檔的副本, 其中該第一主機更用於執行:擷取該虛擬機器對該硬碟映像檔的一寫入請求,其中該寫入請求包含一寫入資料、一輸入位置資訊及一輸出位置資訊;將該寫入資料複製到該資料暫存區;計算該寫入資料的一第一鍵值;將該第一鍵值、該輸入位置資訊及該輸出位置資訊存入一第一資源位置結構;暫停該虛擬機器的運作,並根據該第一資源位置結構及判斷該第一鍵值與對應於該輸入位置資訊的一第二鍵值的比較結果產生一第二資源位置結構,其中該第二鍵值對應於該資料暫存區中的一既存資料;以及根據該第二資源位置結構輸出該備援資料組至該第二主機,以供該第二主機產生該虛擬機器的副本及該硬碟映像檔的副本,其中當該第一鍵值與該第二鍵值相同時,該備援資料組包含該第二資源位置結構以及該既存資料與該寫入資料中的僅一者。 A virtual machine backup system, including: A first host including a virtual machine, a data temporary storage area and a hard disk image file, the virtual machine is connected to the data temporary storage area, the first host is used to output a redundant data group; and a second The host is connected to the first host, the second host is used to receive the backup data set, and generate a copy of the virtual machine and a copy of the hard disk image file, wherein the first host is further used to execute: retrieval The virtual machine makes a write request to the hard disk image file, wherein the write request includes a write data, an input location information, and an output location information; copies the write data to the data temporary storage area; calculates a first key value of the written data; store the first key value, the input location information and the output location information into a first resource location structure; suspend the operation of the virtual machine, and store the first key value, the input location information and the output location information according to the first resource location Structure and determine a comparison result between the first key value and a second key value corresponding to the input location information to generate a second resource location structure, wherein the second key value corresponds to an existing data in the data temporary storage area ; and output the backup data set to the second host according to the second resource location structure, so that the second host can generate a copy of the virtual machine and a copy of the hard disk image file, wherein when the first key value and When the second key values are the same, the backup data group includes the second resource location structure and only one of the existing data and the written data. 如請求項10所述的虛擬機器備援系統,其中該第一主機更用於壓縮對應該輸入位置資訊的一原始資料以產生該既存資料。The virtual machine backup system of claim 10, wherein the first host is further used to compress a raw data corresponding to the input location information to generate the existing data. 如請求項10所述的虛擬機器備援系統,其中該第一主機將該寫入資料複製到該資料暫存區包含: 以一稀疏檔案格式將該寫入資料存入該資料暫存區。 The virtual machine backup system as described in claim 10, wherein the first host copies the written data to the data temporary storage area including: The written data is stored in the data temporary storage area in a sparse file format. 如請求項10所述的虛擬機器備援系統,其中在暫停該虛擬機器的該運作時,該第一主機更用於執行: 判斷該第一資源位置結構中是否存在對應一異動的一分頁位置資訊;以及當該第一資源位置結構中存在對應該異動的該分頁位置資訊時,計算對應該分頁位置資訊的資料的一第三鍵值以作為該第二鍵值。 The virtual machine backup system as described in claim 10, wherein when suspending the operation of the virtual machine, the first host is further used to execute: Determine whether there is a paging position information corresponding to a change in the first resource position structure; and when there is a paging position information corresponding to the change in the first resource position structure, calculate a first data corresponding to the paging position information. The third key value is used as the second key value. 如請求項13所述的虛擬機器備援系統,其中在判斷該第一資源位置結構中是否存在對應該異動的該分頁位置資訊之前,該第一主機更用於將該虛擬機器的該分頁位置資訊作為該輸入位置資訊。The virtual machine backup system as described in claim 13, wherein before determining whether there is the paging location information corresponding to the change in the first resource location structure, the first host is further used to save the paging location of the virtual machine. information as the input location information. 如請求項10所述的虛擬機器備援系統,其中該第一資源位置結構包含該輸入位置資訊與該輸出位置資訊之間的一對應關係,該第一主機更用於執行: 當該第一鍵值與該第二鍵值不同時,移除該第一資源位置結構中的該輸入位置資訊與該輸出位置資訊的該對應關係以產生該第二資源位置結構,其中該備援資料組包含該第二資源位置結構、該既存資料及該寫入資料。 The virtual machine backup system of claim 10, wherein the first resource location structure includes a corresponding relationship between the input location information and the output location information, and the first host is further configured to execute: When the first key value is different from the second key value, the corresponding relationship between the input location information and the output location information in the first resource location structure is removed to generate the second resource location structure, wherein the preparation The support data group includes the second resource location structure, the existing data and the written data. 如請求項10所述的虛擬機器備援系統,其中該虛擬機器係一第一虛擬機器,該資料暫存區係一第一資料暫存區,該第二主機於接收該備援資料組後,該第二主機更用於執行: 當該第二資源位置結構包含該輸入位置資訊及該輸出位置資訊之間的一對應關係時,依據一去重複資料產生一還原資料,其中該去重複資料為該備援資料組中的該既存資料或該寫入資料;至少依據該去重複資料及該輸入位置資訊產生該虛擬機器的該副本;以及至少依據該還原資料及該輸出位置資訊產生該硬碟映像檔的該副本。 The virtual machine backup system as described in claim 10, wherein the virtual machine is a first virtual machine, the data temporary storage area is a first data temporary storage area, and the second host receives the backup data group , the second host is more used to execute: When the second resource location structure includes a corresponding relationship between the input location information and the output location information, a restoration data is generated based on a deduplication data, wherein the deduplication data is the existing data in the backup data group. data or the written data; generating the copy of the virtual machine based on at least the deduplication data and the input location information; and generating the copy of the hard disk image file based on at least the restore data and the output location information. 如請求項10所述的虛擬機器備援系統,其中該第二主機於接收該備援資料組後,該第二主機更用於輸出一確認訊號至該第一主機,及該第一主機受該確認訊號觸發而運行該虛擬機器。The virtual machine backup system as described in claim 10, wherein after the second host receives the backup data set, the second host is further used to output a confirmation signal to the first host, and the first host receives The confirmation signal is triggered to run the virtual machine. 如請求項10所述的虛擬機器備援系統,其中該第一主機於輸出該備援資料組至該第二主機後,更重置該第二資源位置結構。The virtual machine backup system of claim 10, wherein the first host further resets the second resource location structure after outputting the backup data set to the second host.
TW111141793A 2022-11-02 2022-11-02 Virtual machine backup method and system TWI826093B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
TW111141793A TWI826093B (en) 2022-11-02 2022-11-02 Virtual machine backup method and system
US18/197,582 US20240143455A1 (en) 2022-11-02 2023-05-15 Virtual machine backup system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW111141793A TWI826093B (en) 2022-11-02 2022-11-02 Virtual machine backup method and system

Publications (2)

Publication Number Publication Date
TWI826093B true TWI826093B (en) 2023-12-11
TW202420077A TW202420077A (en) 2024-05-16

Family

ID=90053165

Family Applications (1)

Application Number Title Priority Date Filing Date
TW111141793A TWI826093B (en) 2022-11-02 2022-11-02 Virtual machine backup method and system

Country Status (2)

Country Link
US (1) US20240143455A1 (en)
TW (1) TWI826093B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201416881A (en) * 2013-12-09 2014-05-01 Annethen Technology Co Ltd Operation method of distributed memory disk cluster storage system
TW201642620A (en) * 2014-06-05 2016-12-01 Cavium Inc Systems and methods for secured backup of hardware security modules for cloud-based web services
US9864656B1 (en) * 2011-06-30 2018-01-09 EMC IP Holding Company LLC Key value databases for virtual backups
CN109726042A (en) * 2017-10-27 2019-05-07 群晖科技股份有限公司 File backup device and method
US10496838B1 (en) * 2017-10-06 2019-12-03 EMC IP Holding Company LLC Security protection for virtual machine backups
CN112540873A (en) * 2020-12-03 2021-03-23 华云数据控股集团有限公司 Disaster tolerance method and device, electronic equipment and disaster tolerance system
CN114579559A (en) * 2020-11-30 2022-06-03 华为云计算技术有限公司 Data synchronization method and device, computer equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9864656B1 (en) * 2011-06-30 2018-01-09 EMC IP Holding Company LLC Key value databases for virtual backups
TW201416881A (en) * 2013-12-09 2014-05-01 Annethen Technology Co Ltd Operation method of distributed memory disk cluster storage system
TW201642620A (en) * 2014-06-05 2016-12-01 Cavium Inc Systems and methods for secured backup of hardware security modules for cloud-based web services
US10496838B1 (en) * 2017-10-06 2019-12-03 EMC IP Holding Company LLC Security protection for virtual machine backups
CN109726042A (en) * 2017-10-27 2019-05-07 群晖科技股份有限公司 File backup device and method
CN114579559A (en) * 2020-11-30 2022-06-03 华为云计算技术有限公司 Data synchronization method and device, computer equipment and storage medium
CN112540873A (en) * 2020-12-03 2021-03-23 华云数据控股集团有限公司 Disaster tolerance method and device, electronic equipment and disaster tolerance system

Also Published As

Publication number Publication date
US20240143455A1 (en) 2024-05-02

Similar Documents

Publication Publication Date Title
US20200409738A1 (en) Virtual machine backup from computing environment to storage environment
US10191677B1 (en) Asynchronous splitting
US10467246B2 (en) Content-based replication of data in scale out system
US8738813B1 (en) Method and apparatus for round trip synchronous replication using SCSI reads
US9875042B1 (en) Asynchronous replication
US8706694B2 (en) Continuous data protection of files stored on a remote storage device
US8689047B2 (en) Virtual disk replication using log files
US10002048B2 (en) Point-in-time snap copy management in a deduplication environment
US10140303B1 (en) Application aware snapshots
JP4515132B2 (en) Storage system, storage device, and remote copy method
US10496487B1 (en) Storing snapshot changes with snapshots
US20070055710A1 (en) BLOCK SNAPSHOTS OVER iSCSI
US9639295B1 (en) Method and apparatus for reducing splitter latency using parallel splitting
US11240306B2 (en) Scalable storage system
JP2016513306A (en) Data storage method, data storage device, and storage device
CN111316251B (en) Scalable storage system
WO2018076633A1 (en) Remote data replication method, storage device and storage system
EP3495939B1 (en) Method and device for storing data in distributed block storage system, and computer readable storage medium
US11614879B2 (en) Technique for replicating oplog index among nodes of a cluster
US20240061603A1 (en) Co-located Journaling and Data Storage for Write Requests
US20210223957A1 (en) Storage apparatus and storage control method
TWI826093B (en) Virtual machine backup method and system
US20230350760A1 (en) Physical size api for snapshots backed up to object store
CN113544635A (en) Data processing method and device in storage system and storage system
JP6376626B2 (en) Data storage method, data storage device, and storage device