CN100452218C - Hard disk data backup method - Google Patents
Hard disk data backup method Download PDFInfo
- Publication number
- CN100452218C CN100452218C CNB2005100752979A CN200510075297A CN100452218C CN 100452218 C CN100452218 C CN 100452218C CN B2005100752979 A CNB2005100752979 A CN B2005100752979A CN 200510075297 A CN200510075297 A CN 200510075297A CN 100452218 C CN100452218 C CN 100452218C
- Authority
- CN
- China
- Prior art keywords
- hard disk
- backup
- data
- area
- backup data
- Prior art date
- Legal status (The legal status 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 status listed.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims abstract description 27
- 238000005192 partition Methods 0.000 claims description 8
- 241000700605 Viruses Species 0.000 abstract description 4
- 230000009385 viral infection Effects 0.000 description 2
- 241000282412 Homo Species 0.000 description 1
- 230000001066 destructive effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000008685 targeting Effects 0.000 description 1
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
技术领域 technical field
本发明涉及一种数据备份方法,特别是一种对硬盘中的数据进行备份的方法。The invention relates to a data backup method, in particular to a method for backing up data in a hard disk.
背景技术 Background technique
在信息发达的今天,计算机的使用率已经大为普及,计算机的运用也由企业转为一般大众。计算机的使用最重要的就是它提供的操作环境,也就是我们所谓的操作系统(operation system)。现在最广泛使用的操作系统,如windows系列的操作系统,一直都是人们最常使用的操作系统,正因如此,网络上经常会发现针对windows操作系统攻击的计算机病毒,而当遇到破坏性强的病毒,常常会损及操作系统;有时人为因素也会造成操作系统的重要数据遗失,这些都会危害到操作系统的正常运作。Today, with the development of information, the utilization rate of computers has been greatly popularized, and the use of computers has also changed from enterprises 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 (operation system). Now the most widely used operating system, such as the operating system of the windows series, has always been the operating system most commonly used by people. Because of this, computer viruses targeting the windows operating system are often found on the Internet, and when encountering destructive Strong viruses often damage the operating system; sometimes human factors can also cause important data loss in the operating system, which will endanger the normal operation of the operating system.
因此对计算机数据进行备份是必须的,这样可以有效预防病毒所造成的影响或是人为不当的操作。目前已有一些计算机数据备份的方法,如台湾专利589526号的一种硬盘数据控制方法,其使用第一硬盘标示为主硬盘,第二硬盘标示为备份硬盘,并通过定期对比该主硬盘及该备份硬盘,当对比出有待备份数据储存于该主硬盘中但没有储存于该备份硬盘中,则进行一自动备份程序,而所述的自动备份程序为设定一备份周期,定期对比该主硬盘与该备份硬盘;及储存备份该主硬盘的待备份数据到该备份硬盘。Therefore, it is necessary to back up computer data, which can effectively prevent the impact of viruses or human improper operations. There are some computer data backup methods at present, such as a kind of hard disk data control method of Taiwan Patent No. 589526, which uses the first hard disk to be marked as the main hard disk, and the second hard disk is marked as the backup hard disk, and by regularly comparing the main hard disk and the Backup hard disk, when the data to be backed up is compared and stored in the main hard disk but not stored in the backup hard disk, then an automatic backup procedure is carried out, and the automatic backup procedure is to set a backup cycle and regularly compare the main hard disk and the backup hard disk; and storing the data to be backed up for backing up the main hard disk to the backup hard disk.
而台湾589526号专利所提供的数据备份操作,备份硬盘所储存的备份数据并不安全,因为这种方法仍有可能会遭受病毒感染或人为不当存取,而破坏备份数据初始的完整性。However, in the data backup operation provided by Taiwan Patent No. 589526, the backup data stored in the backup hard disk is not safe, because this method may still suffer from virus infection or improper access by humans, and destroy the original integrity of the backup data.
发明内容 Contents of the invention
本发明所要解决的技术问题,在于提供一种硬盘数据备份方法,能确保备份数据储存于硬盘时不被存取,以维持原备份数据内容的完整性。The technical problem to be solved by the present invention is to provide a hard disk data backup method, which can ensure that the backup data is not accessed when stored in the hard disk, so as to maintain the integrity of the original backup data content.
为了解决上述技术问题,本发明提供了一种硬盘数据备份方法,包括:In order to solve the above technical problems, the invention provides a hard disk data backup method, comprising:
选取一备份数据,所述备份数据来自所述硬盘的数据扇区中储存的数据;Selecting a backup data, the backup data comes from the data stored in the data sector of the hard disk;
分析所述硬盘的空间使用状态;Analyzing the space usage state of the hard disk;
根据分析结果判断所述硬盘的剩余空间是否可以储存所述备份数据;judging whether the remaining space of the hard disk can store the backup data according to the analysis result;
当所述硬盘的剩余空间可以存储所述备份数据时,压缩所述备份数据;When the remaining space of the hard disk can store the backup data, compress the backup data;
划分一备份区在所述硬盘后端的高地址区;Divide a backup area in the high address area at the back end of the hard disk;
储存已压缩的备份数据在所述备份区;及storing compressed backup data in said backup area; and
调整所述硬盘的最大地址,所述最大地址小于所述备份区所使用的最小地址。Adjusting the maximum address of the hard disk, where the maximum address is smaller than the minimum address used by the backup area.
采用本发明的硬盘数据备份方法,将备份数据储存于硬盘后端的备份区,并通过重设硬盘的最大地址,可以让备份数据不在最大地址内,让操作系统无法对备份数据存取,以达到备份数据的完整性,而避免感染病毒或是人为不当的操作,造成对备份数据的破坏。By adopting the hard disk data backup method of the present invention, the backup data is stored in the backup area at the back end of the hard disk, and by resetting the maximum address of the hard disk, the backup data is not within the maximum address, so that the operating system cannot access the backup data, so as to achieve Integrity of the backup data, and avoid virus infection or human improper operation, causing damage to the backup data.
附图说明 Description of drawings
图1为本发明一实施例的操作控制流程图;Fig. 1 is the operation control flowchart of an embodiment of the present invention;
图2为本发明一实施例的数据备份操作流程图;Fig. 2 is the data backup operation flowchart of an embodiment of the present invention;
图3为本发明一实施例的数据还原操作流程图;及FIG. 3 is a flowchart of a data restoration operation according to an embodiment of the present invention; and
图4为本发明一实施例的移除备份数据操作流程图。FIG. 4 is a flowchart of an operation for removing backup data according to an embodiment of the present invention.
具体实施方式 Detailed ways
本发明为一种硬盘数据备份方法,可用于备份硬盘中的数据,而可以在操作系统发生损毁时,利用备份的数据来还原操作系统初始的设定。The invention relates to a hard disk data backup method, which can be used for backing up data in the hard disk, and when the operating system is damaged, the backup data can be used to restore the initial setting of the operating system.
图1为本发明一实施例的操作控制流程图,如图1所示,其包括以下步骤:Fig. 1 is an operation control flowchart of an embodiment of the present invention, as shown in Fig. 1, it comprises the following steps:
首先判断有没有设定密码(步骤S101),若判断为有,则由使用者输入密码(步骤S103),以验证使用者是否可以合法使用本发明所提供的功能操作,并进一步判断输入密码是否正确(步骤S105),若使用者所输入的密码错误且达3次,则结束本流程。First judge whether there is a password set (step S101), if it is judged as yes, then the user inputs the password (step S103), to verify whether the user can legally use the function operation provided by the present invention, and further judge whether the input password is Correct (step S105), if the password entered by the user is wrong and reaches 3 times, then this process ends.
而当输入密码正确或没有设定密码时,则判断计算机使用的硬盘支持还是不支持硬盘保留区(Host Protected Area,HPA)的功能设定(步骤S107),若判断结果有,则提供一功能选项供使用者选择操作(步骤S109),此功能选项可以为数据备份操作(步骤S111)、数据还原操作(步骤S113)、移除备份数据操作(步骤S115)、设定密码操作(步骤S117)或是离开(步骤S119)以直接结束本流程。而对于硬盘不支持硬盘保留区的功能设定时,则结束本流程。And when the input password is correct or when no password is set, then it is judged that the hard disk used by the computer supports or does not support the function setting of the hard disk reserved area (Host Protected Area, HPA) (step S107), if the judgment result has, then a function is provided The option is for the user to select an operation (step S109). This function option can be a data backup operation (step S111), a data restoration operation (step S113), a removal backup data operation (step S115), and a password setting operation (step S117) Or leave (step S119) to end the process directly. And when the hard disk does not support the function setting of the reserved area of the hard disk, the process ends.
图2为本发明一实施例的数据备份操作流程图,对图1数据备份(步骤S111)的功能操作,其详细步骤如下:Fig. 2 is the data backup operation flowchart of an embodiment of the present invention, to the functional operation of Fig. 1 data backup (step S111), its detailed steps are as follows:
利用HPA SET MAX命令将硬盘容量设为实际容量(步骤S201),即此时硬盘并没有规划硬盘保留区,即硬盘可以存取的空间为硬盘的实际容量;并由使用者从硬盘的数据扇区中选取备份数据(步骤S203),接着继续分析硬盘空间的使用状况(步骤S205),以得知硬盘的分割状况、分割区的空间大小及剩余可用空间的大小。Utilize the HPA SET MAX command to set the hard disk capacity as the actual capacity (step S201), that is, the hard disk does not plan the hard disk reserved area at this time, that is, the space that the hard disk can access is the actual capacity of the hard disk; Select the backup data in the area (step S203), and then continue to analyze the usage status of the hard disk space (step S205), to know the partition status of the hard disk, the space size of the partition area and the size of the remaining free space.
接着根据硬盘的剩余空间的大小判断是否足够储存步骤S203中选择的备份数据(步骤S207);若判断结果为是,则压缩备份数据(步骤S209);并在硬盘后端的高地址区划分一备份区(步骤S211);储存已压缩数据到备份区(步骤S213),而此备份区的空间大小至少需大于备份数据或压缩后备份数据的大小,其中备份区所储存的备份数据中,也包括相关的控制数据,如备份数据的空间大小、备份数据在原扇区分布位置及备份数据所对应原扇区的类型,一起储存到备份区中;另一方面为减少备份数据占用备份区的空间,本实施例在将备份数据放到备份区之前先将备份数据压缩,当然备份数据也可以在备份区的空间大小大于备份数据时,直接将备份数据放到备份区。Then judge whether enough to store the backup data (step S207) selected in the step S203 according to the size of the remaining space of the hard disk; If the judgment result is yes, then compress the backup data (step S209); and divide a backup in the high address area of the hard disk rear end area (step S211); store the compressed data to the backup area (step S213), and the space size of this backup area needs to be greater than the size of the backup data or the compressed backup data at least, wherein the backup data stored in the backup area also includes Relevant control data, such as the space size of the backup data, the distribution position of the backup data in the original sector and the type of the original sector corresponding to the backup data, are stored in the backup area together; on the other hand, in order to reduce the space occupied by the backup data, In this embodiment, the backup data is compressed before being placed in the backup area. Of course, the backup data can also be directly placed in the backup area when the size of the backup area is larger than the backup data.
步骤S207中判断结果为否时,则显示空间不够的信息通知使用者(步骤S221),并结束本流程。If the judgment result in step S207 is negative, the user is notified of the information that the display space is not enough (step S221 ), and the flow ends.
当已压缩的备份数据已储存到备份区时,判断是否调整硬盘的分割区(步骤S215),即备份区的空间与硬盘原划分的分割区出现重迭时,需重新调整硬盘分割区(步骤S219),让硬盘的分割区不涵盖备份区;最后根据备份区大小以HPA SET MAX命令重新调整硬盘的最大地址(步骤S217),而使硬盘的最大地址小于备份区使用的地址,以确保备份区储存的数据不会被存取破坏,而达到数据备份的效果。When the compressed backup data has been stored in the backup area, it is judged whether to adjust the partitions of the hard disk (step S215). S219), so that the partition of the hard disk does not cover the backup area; finally according to the size of the backup area, readjust the maximum address of the hard disk with the HPA SET MAX command (step S217), and make the maximum address of the hard disk less than the address used by the backup area to ensure backup The data stored in the storage area will not be destroyed by access, so as to achieve the effect of data backup.
图3为本发明一实施例的数据还原操作流程图。本实施例备份数据还原时,利用HPA SET MAX命令将硬盘容量设为实际容量(步骤S301),此动作将备份区禁止存取数据的动作解除;之后判断备份区是否储存有备份数据(步骤S303);若判断结果为否则结束本流程,否则解压缩备份数据(步骤S305);再将备份数据还原至硬盘的原扇区(步骤S307);而后进一步根据备份区大小以HPASET MAX命令调整硬盘的最大地址(步骤S309),使硬盘的最大地址小于备份区使用的地址,禁止备份区的数据存取动作。FIG. 3 is a flowchart of a data restoration operation according to an embodiment of the present invention. When the backup data of this embodiment is restored, use the HPA SET MAX command to set the hard disk capacity to the actual capacity (step S301), and this action removes the action of prohibiting access to data in the backup area; then judge whether the backup area stores backup data (step S303 ); if the judgment result is otherwise end this flow process, otherwise decompress the backup data (step S305); then the backup data is restored to the original sector of the hard disk (step S307); then further adjust the hard disk according to the size of the backup area with the HPASET MAX command The maximum address (step S309), making the maximum address of the hard disk smaller than the address used by the backup area, prohibiting data access actions in the backup area.
图4为本发明一实施例的移除备份数据操作流程图。本实施例移除数据备份时,利用HPA SET MAX命令将硬盘容量设为实际容量(步骤S401);判断备份区有无备份数据(步骤S403);若有则直接移除备份数据(步骤S405);并以HPASET MAX命令重设硬盘大小为原始空间(步骤S407)以释放硬盘空间。若无则直接结束本流程。FIG. 4 is a flowchart of an operation for removing backup data according to an embodiment of the present invention. When the present embodiment removes the data backup, use the HPA SET MAX command to set the hard disk capacity as the actual capacity (step S401); judge whether there is backup data in the backup area (step S403); if there is, then directly remove the backup data (step S405) ; And reset hard disk size with HPASET MAX command as original space (step S407) to release hard disk space. If not, end this process directly.
值得注意的是,尽管本实施例以流程图进行说明,但是掌握本技术领域一般技术人员可以理解,本实施例的处理也能够以软件程序的计算机可读取记录媒体的形式或各种形式散布。It is worth noting that although this embodiment is described with a flowchart, those skilled in the art can understand 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 .
而以软件程序来实现本实施例时,包括有:一第一程序代码,可通过HPASET MAX命令设定硬盘容量的最大地址。一第二程序代码,可从硬盘所储存的数据中选取一备份数据。一第三程序代码,可分析硬盘空间的使用状态,以判断是否有足够空间储存备份数据。一第四程序代码,可在硬盘的后端划分一备份区,并在备份区储存备份数据。一第五程序代码,可提供压缩及解压缩备份数据的操作。And when realizing the present embodiment with software program, comprise: a first program code, can set the maximum address of hard disk capacity by HPASET MAX order. A second program code can select a backup data from the data stored in the hard disk. A third program code can analyze the usage state of the hard disk space to determine whether there is enough space to store the backup data. A fourth program code can divide a backup area at the back end of the hard disk, and store backup data in the backup area. A fifth program code can provide operations of compressing and decompressing backup data.
当然,本发明还可有其它多种实施例,在不背离本发明精神及其实质的情况下,熟悉本领域的技术人员当可根据本发明作出各种相应的改变和变形,但这些相应的改变和变形都应属于本发明所附的权利要求的保护范围。Certainly, the present invention also can have other multiple embodiments, without departing from the spirit and essence of the present invention, those skilled in the art can make various corresponding changes and deformations according to the present invention, but these corresponding Changes and deformations should belong to the scope of protection of the appended claims of the present invention.
Claims (7)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CNB2005100752979A CN100452218C (en) | 2005-06-10 | 2005-06-10 | Hard disk data backup method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CNB2005100752979A CN100452218C (en) | 2005-06-10 | 2005-06-10 | Hard disk data backup method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN1877727A CN1877727A (en) | 2006-12-13 |
| CN100452218C true CN100452218C (en) | 2009-01-14 |
Family
ID=37510131
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CNB2005100752979A Expired - Fee Related CN100452218C (en) | 2005-06-10 | 2005-06-10 | Hard disk data backup method |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN100452218C (en) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8423735B2 (en) | 2010-05-21 | 2013-04-16 | International Business Machines Corporation | Space reservation in a deduplication system |
| CN102419694A (en) * | 2010-09-27 | 2012-04-18 | 智微科技股份有限公司 | Method for accessing storage device and electronic system |
| CN103049223B (en) * | 2012-12-28 | 2016-01-20 | 厦门市美亚柏科信息股份有限公司 | A kind of release method of hard disc hidden area, device and system |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2003248607A (en) * | 2002-02-26 | 2003-09-05 | Adc Technology Kk | Backup system, program for backup, and backup method |
| US20040122998A1 (en) * | 2002-12-20 | 2004-06-24 | Etrunk Technologies Inc. | Access control method and apparatus for a single hard disk with an automatic backup capability |
| JP2004213365A (en) * | 2002-12-27 | 2004-07-29 | Yec:Kk | Hard disk drive unit, data recording device, backup device, restore device, backup method, and computer program executable in computer for making computer function as back up device |
| CN1523597A (en) * | 2003-01-16 | 2004-08-25 | Lg������ʽ���� | Method of displaying data information to be deleted in digital video recorder |
| CN1609986A (en) * | 2004-11-17 | 2005-04-27 | 秦峰 | Permanent dynamic holding technique for hard discs |
-
2005
- 2005-06-10 CN CNB2005100752979A patent/CN100452218C/en not_active Expired - Fee Related
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2003248607A (en) * | 2002-02-26 | 2003-09-05 | Adc Technology Kk | Backup system, program for backup, and backup method |
| US20040122998A1 (en) * | 2002-12-20 | 2004-06-24 | Etrunk Technologies Inc. | Access control method and apparatus for a single hard disk with an automatic backup capability |
| JP2004213365A (en) * | 2002-12-27 | 2004-07-29 | Yec:Kk | Hard disk drive unit, data recording device, backup device, restore device, backup method, and computer program executable in computer for making computer function as back up device |
| CN1523597A (en) * | 2003-01-16 | 2004-08-25 | Lg������ʽ���� | Method of displaying data information to be deleted in digital video recorder |
| CN1609986A (en) * | 2004-11-17 | 2005-04-27 | 秦峰 | Permanent dynamic holding technique for hard discs |
Also Published As
| Publication number | Publication date |
|---|---|
| CN1877727A (en) | 2006-12-13 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP1434135B1 (en) | Method for backing up and recovering data in the hard disk of a computer | |
| JP4582485B2 (en) | Method and apparatus for building a complete data protection scheme | |
| US9201746B2 (en) | Method for mirroring a log file by threshold driven synchronization | |
| CN103389928B (en) | A kind of method of computer data backup and recovery | |
| CN106527992A (en) | Method and device for destroying data in storage equipment | |
| WO2018006587A1 (en) | File storage method, terminal, and storage medium | |
| CN104461791B (en) | Information processing method and device | |
| CN107818028A (en) | A kind of computer data backup and restoring method | |
| CN103064752A (en) | Method and device of repairing document | |
| US10762203B2 (en) | Reducing impact of malware/ransomware in caching environment | |
| CN100454269C (en) | Automatic repair method and system for basic input and output system | |
| CN104598328A (en) | File system repair method, device and system | |
| CN111382011B (en) | A file data access method, device and computer-readable storage medium | |
| CN100452218C (en) | Hard disk data backup method | |
| CN110515769A (en) | A backup processing method, device, electronic equipment, and readable storage medium | |
| CN110767258A (en) | Data erasure command test method and related device | |
| CN112347037A (en) | Snapshot processing method, device, medium and electronic equipment for storage volume | |
| CN117724899A (en) | A project data backup method, system and medium | |
| CN110069330A (en) | A kind of data destruction method based on system load, device and equipment | |
| TWI273389B (en) | Data backup method for hard disk | |
| CN104166598A (en) | Electronic equipment and interrupt protection method thereof | |
| JP3392283B2 (en) | How to prevent computer virus intrusion | |
| CN101295275A (en) | A computer-aided management method and system | |
| US8140597B2 (en) | Computer system memory management | |
| CN116662076B (en) | Data protection method, device, equipment and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant | ||
| C17 | Cessation of patent right | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20090114 Termination date: 20100610 |