1273389 九、發明說明: 【發明所屬之技術領域】 本發明係為-種資料備份方法,特別是關於一種在硬 碟中的資料所進行的備份方法。 【先前技術】 在賁訊發達的今日,電腦的使用率已經大為普及,電 細的運用亦由企業轉為一般大眾。電腦的使用最重要的就 是它提供的操作環境,也就是我們所謂的作業系統 ^叩eration system)。現在最普及最被民眾廣為使用的作 :,如wlnd〇ws系列的作業系統,一直都是人們最常 使用的作業系統,正因如此,網路上經常會發現針對 統攻擊的電腦病毒,而當遇到破壞性強的 作二二1貝及作#系統’亦或是人為操控因素,造成 ^業糸統的重要㈣遺失,均會危#到作業系統的正g 以有腦資料的備份’此動作是必須,如此將可 有的電響或是人為不當的操作。而現 批制古、Γ Γ勝台灣專利589526號『硬碟資粗 示:為備份i碟’使並用二第定―::標示為主硬碟,第二硬碟標 當比對出機晴 程序係為奴1錢^備f序’而所述的自動備份 5 Ϊ273389 份硬碟 述台灣專利589526號所提供的資料備份操 備^更碟所_存的備份資料並不 =病毒感染或人為不當存取,而破壞備份 【發明内容】 借^發明所要解決的技術問題,在於提供-種硬碟資料 持=資=:::, 為了解決上述技術問題,根據本發明的一種方 備份方法’包括:㈣硬碟資料磁區中所 能.取—備份貧料;分析該硬碟的空間使用狀 二^據》析結果_硬碟的剩餘空間是否可以儲存該備 ,劃分—備份區在該硬碟後端的高位址區;壓縮備 ^貝料;當該硬碟_餘空間足以儲存已壓縮的備份資料 蚪,儲存該備份資料在該備份區;以及調整該硬碟的一最 大位址,且該最大位址係小於該備份區所使用的位址,使 得該硬碟的·存取空間僅止於在該最大位址之内。 β為了解決上述技術問題,根據本發明的另一種方案, 提供一種電腦可讀取之記錄媒體,用以備份一硬碟中的資 料,包括:-第-程序碼’可透過HPA SET ΜΑχ命令設定 ,硬碟容量的最大位址;—第二程序碼,可從該硬碟所儲 ,料中選取一備份資料;_第三程序碼,可分析該硬 餘㈣的使用狀態,以判斷是否奴夠空間儲存該備 刀貝料,-第四程序碼,可在該硬碟的後端劃分—備份區, 1273389 並在該備份區儲存該備份資料;以及一 縮備份資料,·因此當該第三程序碼判斷出,可摩 =咖備份資料時,該第四程序碼係儲存4= 命令重設該硬碟容量的最大位址= 取大位址小於該備份區使用的位址。 採用本發明的硬碟資料備份方法,係將備 :::::端的備份區’並藉由重設硬碟的最大位址:而; =1_料不在最从㈣,讓作«統無法對備3 人為不當的操作,造成對備份資料的破壞免L或疋 【實施方式】1273389 IX. Description of the invention: [Technical field to which the invention pertains] The present invention relates to a method for backing up data, and more particularly to a method for backing up data on a hard disk. [Prior Art] In today's developed city, the use rate of computers has become very popular, and the use of fine computers has also changed from the enterprise to the general public. The most important thing about the use of a computer is the operating environment it provides, which is what we call the operating system ^叩eration system. Nowadays, it is the most popular and widely used by the public: for example, the operating system of the wlnd〇ws series has always been the most commonly used operating system, which is why computer viruses for attacking attacks are often found on the Internet. When encountering a destructive work, the two systems, or the system, or the human control factor, the important (4) loss of the industry system will be dangerous to the operating system, with a backup of the brain data. 'This action is a must, so there will be an electric shock or an improper operation. And now the approval of the ancient, Γ Γ 台湾 Taiwan patent 589526 "hard disk crude: for the backup i-disc" to use the second set -:: marked as the main hard disk, the second hard disk standard when the machine is sunny The program is for the slave 1 money ^ prepare the f-order' and the automatic backup 5 Ϊ 273389 copies of the hard disk described in Taiwan patent 589526 data backup operations ^ more discs _ stored backup data is not = virus infection or artificial Improper access, and destruction of backup [invention content] The technical problem to be solved by the invention is to provide a kind of hard disk data holding ==::: In order to solve the above technical problem, a side backup method according to the present invention Including: (4) Hard disk data in the magnetic area can be taken - backup - poor material; analysis of the space usage of the hard disk 2 data analysis results _ hard disk free space can store the device, divided - backup area in the a high address area of the hard disk backend; compressing the spare data; when the hard disk_sufficient space is sufficient to store the compressed backup data, storing the backup data in the backup area; and adjusting a maximum address of the hard disk, And the maximum address is smaller than that used by the backup area. Site, so-access space was only limited to the hard disk in the address of the maximum. In order to solve the above technical problem, according to another aspect of the present invention, a computer readable recording medium for backing up data in a hard disk is provided, including: - the first - program code can be set by the HPA SET command , the maximum address of the hard disk capacity; - the second program code, can select a backup data from the storage of the hard disk; _ third program code, can analyze the use state of the hard (four) to determine whether slave Enough space to store the preparation knife and beaker, - the fourth program code can be divided on the back end of the hard disk - backup area, 1273389 and store the backup data in the backup area; and a backup data, so when the first The third program code judges that, when the data is backed up, the fourth program code is stored 4= The command resets the maximum address of the hard disk capacity= The large address is smaller than the address used by the backup area. According to the hard disk data backup method of the present invention, the backup area of the ::::: side is prepared and the maximum address of the hard disk is reset: and =1_ is not the most (four), so that the system cannot Improper operation for 3 people, causing damage to backup data without L or 疋 [Implementation]
—曰i了I t審查委員能更進—步瞭解本發明為達成預 採取之技術、手段及功效,請參閱以下有關本發 月之坪細綱與_,相信本發明之目的、特徵 2由此得—深人且具體之瞭解,然⑽附圖式僅提供來 考舁巩明用,並非用來對本發明加以限制者。 - 種硬碟㈣備份方法,於實施時係提供 軟體於BIOS的功能設定中或是置於—光碟中,此軟體可 供備份硬碟中的資料,而可以在作業系統發生損毁時,以 備份的資料來還原作業系統初始的設定。 本實施例所提供的操作方式,請參閱第—圖所^ 本,明操作控制的流程圖,首先判斷有無設定密碼 一 1 ),若判辦為有,則由使用者輪入密碼(〇3 ),以 驗證使用者是否可以合法使用本發明所提供的功能操作, 7 1273389 亚進-步簡輸人密碼是否正確(S1Q5),若使用者所輸入 的密碼錯誤且達3次’則結束本流程。—曰i I I Review Committee can go further and understand the invention to achieve the pre-taken technology, means and efficacy, please refer to the following paragraphs on the syllabus of this month, I believe that the purpose of this invention, feature 2 by This is a deep and specific understanding, but (10) the drawings are provided for consideration only and are not intended to limit the invention. - A hard disk (4) backup method, which is provided in the BIOS function setting or in the CD-ROM. This software can be used to back up the data in the hard disk, and can be backed up when the operating system is damaged. The data to restore the initial settings of the operating system. For the operation mode provided by this embodiment, please refer to the figure of the figure, the flow chart of the operation control, firstly determine whether there is a password set 1), if the judgment is yes, the user turns the password (〇3) In order to verify whether the user can legally use the function provided by the present invention, 7 1273389 is the sub-step-simplified input password correct (S1Q5), and if the password entered by the user is incorrect and reaches 3 times, then the end is Process.
而當輸入密碼正確或是軟體並無設定密碼時,則判斷 電腦使用的硬碟有無支援有硬碟保留區(H〇st p她c⑽ Area,ΗΡΑ)的功能設定(sl〇7),若判斷結果有,則提供 —^能選項以供使用者選擇操作(sl〇9),此功能選項可以 為貧料備份操作(S111)、資料還原操作(S113)、移除備 份貧料核作(S115)、設定密碼操作(8117)或是離開(S119) 以直接結束本流程。而對於硬碟未支援有硬碟保留區的功 能設定時,則結束本流程。 請參閱第二圖,係為本發明較佳實施例的資料備份操 作流程圖。對於第-圖中資料備份(S1U)的功能操作, ,詳細步驟如下:利用ΗΡΑ SET MAX命令將硬碟容量設為 貫際容量(S201)’即此時硬碟並未規劃有硬碟保留區,讓 硬碟可以存取的空間即為硬碟的實際容量;並由使用者從 硬碟的資料磁區中選取備份資料(兑〇3 ),下一步繼續分 硬碟空間的使用狀況(娜),以得知硬碟的分割狀況、分 割區的空間大小及剩餘可用空間的大小。 按君I佩雔-間的大小判斷是否足夠儲 述選擇的備份資料(S2G7);若判斷結果為是,則壓縮備份 育料的空間大小(S209 );並在硬碟後端備的高位址區割分 —備份區(S211);及儲存已壓縮資料到備份區(兕13), 而此備份區的空間大小至少需大於備份資料或壓縮後 f料,其中備:區所儲存的備份資料中,也將相關的 貪料,如備份貢料的空間大小、備份資料在原磁區分佈位 置及備份資料所對應原㈣的類型,—併儲存到備份區 1273389 然備份資料也可以在備份將備份麵縮,當 直接將備份資料放到備份;。、一大小大於備份資料時, 的中,判斷結果為否時,則顯示空間不夠 的成息以告知使用者(S221),並結束本流程。’不夠When the password is entered correctly or the software does not have a password, it is judged whether the hard disk used by the computer supports the function setting of the hard disk reserved area (H〇st p her c(10) Area, ΗΡΑ) (sl〇7). As a result, the -^ option can be provided for the user to select the operation (sl〇9). This function option can be a lean material backup operation (S111), a data restoration operation (S113), and a backup poor material recovery (S115). ), set password operation (8117) or leave (S119) to end this process directly. If the hard disk does not support the function setting of the hard disk reserved area, the process ends. Please refer to the second figure, which is a flow chart of the data backup operation of the preferred embodiment of the present invention. For the function operation of the data backup (S1U) in the first figure, the detailed steps are as follows: use the SET SET MAX command to set the hard disk capacity to the continuous capacity (S201)', that is, the hard disk is not planned to have a hard disk reserved area. The space that the hard disk can access is the actual capacity of the hard disk; and the user selects the backup data from the data area of the hard disk (for 〇3), and continues to divide the use of the hard disk space in the next step. ) to know the partition status of the hard disk, the size of the partition, and the amount of free space remaining. According to the size of Junyi, it is judged whether it is enough to store the selected backup data (S2G7); if the judgment result is yes, the size of the backup breeding material is compressed (S209); and the high address of the hard disk backend is prepared. Zone splitting—backup area (S211); and storing the compressed data to the backup area (兕13), and the size of the backup area must be at least larger than the backup data or the compressed material, where the backup data stored in the area is reserved. In the middle, the related greed, such as the size of the backup tribute, the location of the backup data in the original magnetic area, and the type of the original data (4) of the backup data, are stored in the backup area 1273389. The backup data can also be backed up in the backup. Face down, when the backup data is directly placed in the backup; When the size of the data is larger than the backup data, if the result of the determination is no, the display of the insufficient space is displayed to notify the user (S221), and the process ends. 'not enough
而當已壓縮的備份資斜PAnd when the compressed backup slant P
的分割區出現重二需L:, 硬碟的分割區不涵蓋到備份區; )讓 HPA SET MAX (s; ;;A ^ ^ 大t址小於備份區使用的位址,以確保備份區儲 存的二料不會被存取破壞,而達到資料備份的效果。 ρΓί閱Γ二圖’係為本發明較佳實施例的資料還原操 =、級程圖。本實施例備份資料還原時,· HPA SET麗 硬碟容量設為實際容量(咖),此動作係將備份區 :士=資料的動作解除;之後判斷備份區是否有儲存備 刀貝;斗(303),若判斷結果為否則結束本流程,否則解壓 縮備份資料⑽5);再將備份資料還原至硬碟的原磁區 (S307);而後進一步根據備份大小以ΗρΑ3ΕΤΜΑχ命令調 整硬碟的最大位址,使硬碟的最大位址小於備份區使用的 位址’禁止備份區的資料存取動作。 、睛芩閱第四圖,係為本發明較佳實施例的移除資料備 份操作流程圖。本實施例移除資料備份時,利用HpA set MAX命令將硬碟容量設為實際容量(S4〇1);判斷備份區有 恶備份資料(S403);若有則直接移除備份資料(S4〇5); 9 1273389 並以ΗΡΑ SET MAX命令重設硬碟大小為原始空間(S4〇 以釋放硬碟空間。 ; 值得注意的是,儘管本實施例係以流程圖的架構下進 行說明,但是掌握本技術領域的一般技能的人可以理解, 本實施例的處理也能夠以軟件程序的電腦可讀取記錄媒體 的形式或各種形式散佈,以及不管實際用於承載這一'散 的信號承載媒體的特定類型,本實施_樣可以被實^應 用。 %、 而以軟件程序來實現本實施例時,保括有··一第一 2,,可透過HPA SET MAX命令設定硬碟容量的最大位二呈 i第ϊί序碼,可從硬碟所儲存的資料中選取一備份資 =° -第三程序碼,可分析硬碟空間的使用狀態,以判二 疋否有足夠空間儲存備份資料。一第四程序碼,可在 =端劃分一備份區,並在備份區儲存備份資料。―第五 馬,可^供屡縮及解壓縮備份資料的操作。 铁職疋,本發明確能藉上述所揭露之技術,提供一種避 於習知者的設計,堪能提高整體之使用價值,又其 « j未見於刊物或公開使用,誠已符合發明專利之 ’爰依法提出發明專利申請。 惟,上述所揭露之圖式、說明,僅為本發明之實施例 之 凡精于此項技藝者當可依據上述之說明作其他種種 〜^而這些改變仍屬於本發明之發明精神及以下所界 疋之專利範圍中。 1273389 【圖式簡單說明】 第一圖係為本發明較佳實施例的操作控制流程圖; 第二圖係為本發明較佳實施例的資料備份操作流程圖; 第三圖係為本發明較佳實施例的資料還原操作流程圖;及 第四圖係為本發明較佳實施例的移除備份資料操作流程 圖。 【主要元件符號說明】 第一圖〜第四圖皆為流程圖故無元件符號The partition of the partition needs to be L:, the partition of the hard disk does not cover the backup area;) Let HPA SET MAX (s; ;; A ^ ^ large address is smaller than the address used by the backup area to ensure backup area storage The second material is not damaged by access, but achieves the effect of data backup. ρΓίΓ2' is a data restoration operation=, a level diagram of the preferred embodiment of the present invention. When the backup data is restored in this embodiment, The HPA SET hard disk capacity is set to the actual capacity (coffee). This action will remove the backup area: Shi = data action; then determine whether the backup area has a storage preparation knife; bucket (303), if the judgment result is otherwise ended This process, otherwise decompress the backup data (10) 5); then restore the backup data to the original magnetic area of the hard disk (S307); and then further adjust the maximum address of the hard disk according to the backup size ΗρΑ3ΕΤΜΑχ command, so that the maximum address of the hard disk The address used by the backup area is less than the data access action of the backup area. The fourth drawing is a flowchart of the operation of removing the data backup according to the preferred embodiment of the present invention. In this embodiment, when the data backup is removed, the hard disk capacity is set to the actual capacity (S4〇1) by using the HpA set MAX command; the malicious backup data is determined in the backup area (S403); if there is, the backup data is directly deleted (S4〇) 5); 9 1273389 and reset the hard disk size to the original space with the SET SET MAX command (S4〇 to release the hard disk space. ; It is worth noting that although this embodiment is illustrated by the flow chart architecture, it is mastered. Those skilled in the art will appreciate that the processing of this embodiment can also be distributed in the form of a computer readable recording medium of a software program or in various forms, and regardless of the actual signal carrying medium used to carry the 'scattered signal. For a specific type, the present embodiment can be applied. When the present embodiment is implemented by a software program, the first 2 is saved, and the maximum bit of the hard disk capacity can be set by the HPA SET MAX command. The second is the serial number of the file, and a backup resource = ° - the third program code can be selected from the data stored in the hard disk to analyze the use state of the hard disk space, so as to determine whether there is enough space to store the backup data. The fourth program code can divide a backup area at the = side and store the backup data in the backup area. The fifth horse can be used to repeatedly shrink and decompress the backup data. The iron job, the invention can indeed borrow the above The disclosed technology provides a design that avoids the well-being, can improve the overall use value, and its «j is not found in the publication or public use, and has already complied with the invention patent's application for invention patent according to law. The drawings and descriptions of the present invention are merely examples of the present invention. Those skilled in the art can make various other modifications according to the above description. These changes still belong to the inventive spirit of the present invention and the following. 1273389 [Brief Description of the Drawings] The first drawing is a flow chart of the operation control of the preferred embodiment of the present invention; the second drawing is a flow chart of the data backup operation of the preferred embodiment of the present invention; The flowchart of the data restoration operation of the preferred embodiment of the present invention; and the fourth diagram is a flowchart of the operation of removing the backup data according to the preferred embodiment of the present invention. FIG flowchart are all to fourth element so no sign
1111