201035761 六、發明說明: 【發明所屬之技術領域】 且特別是有關於 本發明是有關於—種資料備份方法 一種根據資料異動比例頓份之方法。 【先前技術】 隨著電腦的日漸普及,s牙紗― 之曰益魔大'然而,當作於電竭之資料量也隨 0電腦之軟硬體故障產生時更碟的損瓌或其他 料付之-炬。此外,在所損所儲存的大量資 :之資料時’使用者需重新安裝並設定作;業: 成使用者的困擾。 作業糸統,因而造 時候,便可利二備^X::後在資料損毁 t前技術係透過將資料儲存至其他㉗201035761 VI. Description of the invention: [Technical field to which the invention pertains] and particularly related to the present invention relates to a method for backing up data according to a method of data sharing. [Prior Art] With the increasing popularity of computers, s 牙 ― ― ― 曰 ' ' ' 然而 然而 然而 然而 然而 然而 然而 然而 然而 然而 然而 然而 然而 然而 然而 然而 然而 然而 然而 然而 然而 然而 然而 然而 然而 然而 然而 然而 然而 然而 然而 然而 然而 然而Fu Zhi - torch. In addition, in the case of a large amount of information stored in the user's information, the user needs to reinstall and set it up; The operation system, so when it is created, it can be used to prepare the ^X:: after the data is destroyed, the technical department saves the data to the other 27
而,-般僅空間,以更新所備份之資料。 所有資料以做備的資料。如果因此而重新複 重複且未更動的資料糸統資源以及執行時間狀 於是,束、'斗,、 時,會利用〜^ *在將㈣透過網路備份至其他硬碟 資料重新#異性備份程式(如rsyne)而僅將有更動之 資料的備^ H相較於先前直接覆寫整份更動後之 動過之區^,法,由於差異性#絲式f要找出資料上更 ,因而需要耗費較多的系統資源。此外,在資 201035761 料更動之部份較多時,利用差異性備份程式做備份所耗費 的時間更是遠大於先前直接用整份更動後之資料做覆寫。 【發明内容】 因此,本發明之一目的是在提供一種資料備份方法, 用以根據資料異動的比例,使用不同之方式備份資料。在 資料更動的比例高於一特定比例時,則直接將所有資料覆 寫至備份空間以做備份。相反地,在資料更動的比例不高 〇 於上述特定比例時,則藉由一差異性備份程式,而僅將有 更動之資料重新備份。 依據本發明一實施例,一種資料備份方法包含以下步 驟:在收到用以將一目標資料夾備份至一備份資料夾之一 備份指令時,產生目標資料夾以及備份資料夾之間的一差 異清單。計算差異清單之至少一差異資料佔目標資料夾之 一差異比例。判斷差異比例是否大於一特定比例。在差異 比例大於上述特定比例時,將目標資料夾之至少一目標資 Q 料覆寫至備份資料夾,以將目標資料夾備份至該備份資料 夾。在差異比例不大於特定比例時,藉由一差異性備份程 式,將目標資料夾備份至備份資料夾。 【實施方式】 請參照第1圖,其繪示依照本發明一實施方式的一種 資料備份方法之流程圖。資料備份方法根據資料異動的比 例,使用不同之方式備份資料。在資料更動的比例高於一 特定比例時,則直接將所有資料覆寫至備份空間以做備 201035761 份。相反地,在資料更動的比例 則藉由-差異性備份程式,而僅將"7'^找比例時, 份。資料備份方法⑽包含以下步驟··更動之㈣重新備 在收到用以將一目標資料 備份指令(步驟_時,產生資料夹之一 夹之間的-差異清單咖20):;料=及備份資料 =用資料備份方法100時 可利用_之dry侧,模擬 驟0) ο 資料傳送至備份資料夾,以取得夹之至少一目標 需傳送的資料清單,作為差[主„β +在於備份資料夾而 .y 巧早乍為差異清早。然而,在苴他實絲彻 中,仍可藉由其他方法產生差異清單(步驟_他貫施例 在^驟13〇中,計算差異清單之至一 標資料夾之一#显μ·也丨^ , 差異貝科佔目 差里資❹* 例。其中’步驟130可藉由加總所有 ί:、=ΐ=得差異清單之—累計差異大小。然 说便1將累s十差異大小除以目標資粗忐+ 外 出差異比例(步驟130)。 “科夹之大小,而計算 ❹ 其中在140中、,判斷差異比例是否大於一特定比例。 將扭〜μ =ux作業系統下應用資料備份方法1〇〇時,可 將特疋比例設為〇 4。缺而,左甘仏— 同兩本.…、在,、他貫施例中,仍可依據不 □而求,而έ又疋對應之特定比例。 在差異比例大於特定比例時,將目 目標貧料覆寫至備份資料夾(步驟l50)4中,在^似 =系統下應用資料備份方法l00時,可利用—作業 =之Cp指令將目標資料覆寫至備份資料夾(步驟15〇)。 -來’即可在目標資料夹與備份資料夹之間差異較大 6 201035761 Ϊ省資Γ夾之目標資料覆寫至備份資料夾,以 即湍找出有更動之資料所雲允我 、丨了人以 铁而…之時間以及系統資源。 然而’在差異比例不大於特定比例時, 備伤程式,將目標資料夾備份 差,、性 其中,在Linux作辈㈣^ 貪科夹(步驟160)。 庫用 ΓΓ 應用資料備份方法⑽時,可 資料備份至備份眘柢水r丰_ 目&貝科夹中有更動之 丁寸侑切至備伤f枓夾(步驟16〇)。如此一 Ο 標資料夾與備份資料夾之間差I 了在目 程式,僅㈣時’利用差異性傷份 動到之資料所需花費之時間以及系統資源。 未更 請參照第2圖,其係第丨圖中步驟⑽之—實 =^標資料夾與備份資料夹之間的差異清單 可包含以下步驟: / m中’·目標f料夾之至少—目標資料是 =存在於備份資料夾。在目標資料不存在於備份資料夹 ’’將目標資料加入差異清單(步驟122)。如此一來,便 可將尚未備份至備份資料夾之資料加入差異清單。 、、此外,可在目標資料已存在於備份資料夾時,判斷上 述目標資料與備份資料夾中對應目標資料之備份資料是否 相同^步驟123)。其中,可藉由核對和(eheeksum)判斷 目標貧料與備份資料是否相同(步驟123)。此外,亦可藉 由比對目‘=貝料之資汛與備份資料之資訊,以判斷目標資 料與備份資料是否相同(步驟123)。其中,用以比對之資 訊可為目標資料與備份資料之修改時間、檔案大小、或其 201035761 他目標資料與備份資料相關之資訊。 加入差異:對:之備份資料時’將目標資料 料相叫應之備份資 此一來,g 差"、/月早(步驟124 )。如 清單。 ,目標資料夹中有更動過之資料,加入差異 ο 點。在所實^式可知’應用本發明具有下列優 時‘貝料夾中的資料之更動比例較高 料夹,以節省找出有更以備份之備份資 資源。m供八動之貝科所萬化費之時間以及系統 時,'列利用弟里I之目標資料夹中的資料之更動比例較低 夺貝m用差異性備份程式, 其::部r更動到之資料所需花 :與備份資料夹係位於同一電觸。因,此,一二= ο 具有較快速度之匯流排或傳輸介面二 :刪夹:的資料覆寫至備份資料爽之執行時:二 面僅在資料更動之比例較低時,利用差異性備份程 =:減差異性備份程式所需耗費之本機系統 ’本發明可適用於系統資源 較人缺之“如網路附接儲存If (Network Attached Storage,NAS) ’做本機備份。 —雖然本發明已以實施方式揭露如上,然其並非用以限 =本發明,任何熟習此技㈣,在不麟本發明之精神和 犯圍内’當可作各種之更動與潤飾,因此本發明之保護範 8 201035761 圍當視後附之申請專利範圍所界定者為準。 【圖式簡單說明】 為讓本發明之上述和其他目的、特徵、優點與實施例 能更明顯易懂,所附圖式之說明如下: 第1圖繪示依照本發明一實施方式的一種資料備份方 法之流程圖。 〇 第2圖係第1圖中步驟120之一實施例。 【主要元件符號說明】 100 :資料備份方法 110〜160 :步驟However, there is only space to update the backed up data. All materials are used as information. If the data resources and execution time are repeated and not changed, then bundles, 'fighting, and then, will use ~^ * to (4) back up to other hard disk data via the network to re-heterogeneous backup program (such as rsyne) and only the information of the modified data is compared to the area where the previous movement has been directly overwritten, and the method is used to determine the data. It takes a lot of system resources. In addition, when there are more changes in the 201035761, the time taken to make backups using the differential backup program is much larger than that of the previous data that was directly changed. SUMMARY OF THE INVENTION Accordingly, it is an object of the present invention to provide a data backup method for backing up data in different ways depending on the proportion of data movement. When the proportion of data changes is higher than a certain percentage, all data is directly overwritten to the backup space for backup. Conversely, when the proportion of data changes is not higher than the above specific ratio, only a change of the data is backed up by a differential backup program. According to an embodiment of the present invention, a data backup method includes the following steps: generating a difference between a target folder and a backup folder when receiving a backup instruction for backing up a target folder to a backup folder List. Calculate at least one difference in the difference list as a percentage of the target folder. Determine if the difference ratio is greater than a specific ratio. When the difference ratio is greater than the above specific ratio, at least one target resource of the target folder is overwritten to the backup folder to back up the target folder to the backup folder. When the difference ratio is not greater than a certain ratio, the target folder is backed up to the backup folder by a differential backup method. Embodiments Please refer to FIG. 1 , which is a flow chart of a data backup method according to an embodiment of the present invention. The data backup method uses different methods to back up data according to the ratio of data changes. When the proportion of data changes is higher than a certain ratio, all the materials will be directly overwritten to the backup space for 201035761. Conversely, the proportion of data changes is based on the -differential backup program, and only the proportions of "quote 7" are used. The data backup method (10) includes the following steps: • The change (4) is re-prepared after receiving the instruction to back up a target data (step _, the difference between the folder is generated - the difference list coffee 20):; Backup data = use data backup method 100 can use _ the dry side, simulation step 0) ο data is transferred to the backup folder to obtain a list of at least one target to be transmitted, as the difference [main „β + lies in the backup The folder and .y are early in the morning, but in the past, the difference list can still be generated by other methods (step _ his application example in step 13〇, calculate the difference list) One of the standard folders #显μ·也丨^, the difference of the Becco account for the difference in the amount of money*. For example, 'Step 130 can sum up all the ί:, =ΐ= the difference list - the cumulative difference size However, it is said that 1 is divided by the size of the difference s ten difference by the target 忐 忐 + out of the difference ratio (step 130). "The size of the folder, and calculate ❹ where 140, to determine whether the difference ratio is greater than a specific ratio. Will twist ~ μ = ux operating system under the application data backup method 1〇 When you are ,, you can set the special proportion to 〇 4. In the absence of it, Zuo Ganyi - the same two ...., in, in his example, can still be based on not seeking, and the corresponding specific When the difference ratio is greater than a certain ratio, the target target poor material is overwritten to the backup folder (step l50) 4, and when the data backup method l00 is applied under the system=, the Cp instruction of the operation=operation= The target data is overwritten to the backup folder (step 15〇). - Come to 'the difference between the target folder and the backup folder. 6 201035761 目标 The target data of the provincial asset folder is overwritten to the backup folder to That is to find out the time and system resources of the information that has changed the information, and the system resources. However, when the difference ratio is not greater than the specific ratio, the injury program will be backed up, and the target folder will be backed up poorly. Among them, in Linux generation (four) ^ Greedy folder (step 160). Library use ΓΓ Application data backup method (10), can be backed up to backup cautious water r Feng _ 目 &; 贝 夹 夹 有 有 有Cut to the injury folder (step 16〇). Such a label folder The difference between the backup folders is in the target program, only (4), the time required to use the data from the differential injury and the system resources. Please refer to Figure 2, which is the step (10) in the figure. The list of differences between the -=========================================================================================== The backup folder ''Adds the target data to the difference list (step 122). In this way, the data that has not been backed up to the backup folder can be added to the difference list. In addition, when the target data already exists in the backup folder And determining whether the target data is the same as the backup data of the corresponding target data in the backup folder (step 123). Wherein, it can be judged by the checksum (eheeksum) whether the target poor material is the same as the backup data (step 123). In addition, it is also possible to judge whether the target data and the backup data are the same by comparing the information of the ‘= materials and the backup data (step 123). The information used for the comparison may be the modification time of the target data and the backup data, the file size, or the information related to the backup data of the 201035761 target data. Add the difference: Yes: When backing up the data, 'Respond to the target data, this is the difference, g difference ", / month early (step 124). As in the list. , there is more information in the target folder, add the difference ο point. In the actual method, it can be seen that the application of the present invention has the following advantages: the data in the bead clip has a higher proportion of the change of the material folder, so as to save the resources of the backup with more backup. m is used for the time and system of the Beacons, and the system uses the differential data of the data in the target folder of the brothers I to use the differential backup program. The data required for the data: the same electrical contact as the backup folder. Because of this, one or two = ο has a faster bus or transmission interface 2: delete folder: the data is overwritten to the backup data cool execution: the two sides only use the difference when the proportion of data changes is low Backup process =: Reduce the cost of the differential backup program to the native system 'The invention can be applied to the system resources are lacking "such as Network Attached Storage (NAS)" to do the local backup. Although the present invention has been disclosed in the above embodiments, it is not intended to limit the present invention, and any skill in the art and the like may be made in the spirit and scope of the present invention. The above-mentioned and other objects, features, advantages and embodiments of the present invention will become more apparent and obvious. The drawings are as follows: Figure 1 is a flow chart of a method for backing up data according to an embodiment of the present invention. Figure 2 is an embodiment of step 120 in Figure 1. [Description of main component symbols] 100: Information preparation Method 110~160: Steps