A kind of data recovery and backup method based on hard disk gapTechnical field
The invention belongs to computer software technical field, it is related to the side of a kind of data recovery based on hard disk gap and backupMethod.
Background technology
With the development and the popularization of computer of information technology, computer is had become indispensable one in people's lifePart, substantial amounts of information is stored in computer.Along with the evolution of computer, computer virus and various spiesSoftware also increasingly spreads unchecked, and this security to computer hard disk data brings acid test.In addition, such as userThe other factors such as maloperation or system crash, also result in the closing of user data loss or antivirus software.Therefore, how to haveThe file and data of effect protection user is also into computer user's focus of attention.
Comprehensive current technology situation, the method for recovery and the backup of conventional hard disc of computer information mainly includes followingIt is several:
(1) recovered and backed up by backup harddisk.Needs are except for storage program area when making in this wayWith outside the hard disk of user data, it is necessary to set backup harddisk again.Although this method can back up user data completely, notWith real-time, while need certain professional knowledge, general user is not allowed easy to operate, not enough facilitated, backup is time-consuming every timeToo much.
(2) backed up using CD.Make general user's reply Default Value in this way, do not have as method 1Have the hard of real-time guard, and CD capacity is limited, typically can only standby system disk, with significant limitation.
(3) backed up and recovered by setting up different subregions in same hard disk.The softwares such as GHOST are to fdiskBacked up.This method does not have the function of real-time guard equally, while BACKUP TIME is oversize, backup file is also easy forIt is destroyed, therefore without very high safety and reliability.
(5) backup is realized based on BIOS and protection subregion and recovered.This method overcomes the shortcoming of method four, realizes extensiveMultiple and backup program code is not fixedly disposed in BIOS chips, and is provided in conventional embedded system, this sideMethod can only realize backup mode of the magnetic track to magnetic track of whole subregion, it is impossible to flexibly back up file, need also exist for restarting system, rightIt is same inconvenient for user.
(6) backup and recovery realized based on protection subregion and hard disk driver.This method ratio method (5) is somewhat simpleEasily, backup and recovery routine are nor put in embedded systems, but by the replacement of hard disk driver, operatingProtection subregion is directly accessed on system.This method first has to open protection subregion, secondly will for different operating systemThe different driver of design, is unduly complex, therefore be also not suitable for most of occasion for domestic consumer.
The content of the invention
In view of this, the invention provides a kind of data recovery based on hard disk gap and backup method, can protect andRecover hard disc data, it is small to customer impact without restarting systems without shutting down computer.
In order to achieve the above object, the technical scheme is that:
Step 1: Client Agent program is written in the hard disk gap of computer, the local hard drive of the computerIn be stored with by defence program.
Step 2: computer starting;Self-starting strategy is used in computer, for setting Client Agent program with calculatingThe startup of operating system in machine and start, and the self-starting strategy is not by computer user and other software intervention.
Step 3: operation Client Agent program, performs hard disk data protection and recovery;Quilt is stored using backup serverDefence program.
Agent runs and checks connection status, Agent starts first thread and the second thread, and first thread is realWhen scanning hard disk gap, the second thread reads Preservation tactics, and real-time guard file integrality.
Whether what is stored in the first thread scanning hard disk gap, detection hard disk gap is wiped free of and is usurped by defence programIt is consistent when changing, and whether detecting by the signature value of the verification file of defence program with write-in, if finding to there is hard disk gap to be tampered,The hard disk gap being tampered then is write back by defence program using not distorting of reading out again, it is ensured that the integrality in hard disk gapAnd correctness;If do not read out do not distort by defence program, download and write back to by defence program from the backup serverHard disk gap.
Second thread is read according to Preservation tactics, to carrying out integrity measurement by defence program, is detected by protection journeyWhether sequence is complete, if imperfect, is downloaded from the backup server described by defence program, or carries out from local hard drive quiltDefence program recovers.
By the integrity information of defence program described in the Preservation tactics.
Step 3 is repeated, until computer shutdown.
Beneficial effect:
(1) the method is real-time guard and recovers hard disc data, right without restarting systems without shutting down computerCustomer impact is small.
(2) the method user can customize the data and file of protection, due to client process real-time online, without timingGo to back up and recover hard disk, reduce the plenty of time shared by backup DISK to Image subregion.
(3) the method deployment is simple, it is only necessary to install once, while user's threshold is than relatively low, without setting protection subregionIt is convenient, flexible Deng complicated setting.
Brief description of the drawings
Fig. 1 is fdisk gap Backup and Restore overall construction drawing.
Embodiment
The present invention will now be described in detail with reference to the accompanying drawings and examples.
This method comprises the following steps:
Step 1: Client Agent program is written in the hard disk gap of computer, deposited in the local hard drive of computerContain by defence program.
Step 2: computer starting;Self-starting strategy is used in computer, for setting Client Agent program with calculatingThe startup of operating system in machine and start, and the self-starting strategy is not by computer user and other software intervention.
Step 3: operation Client Agent program, performs hard disk data protection and recovery;Quilt is stored using backup serverDefence program.
Agent runs and checks connection status, Agent starts first thread and the second thread, and first thread is realWhen scanning hard disk gap, the second thread reads Preservation tactics, and real-time guard file integrality.
Whether what is stored in first thread scanning hard disk gap, detection hard disk gap is wiped free of and is distorted by defence program,And it is consistent when whether detecting by the signature value of the verification file of defence program with write-in, if finding to there is hard disk gap to be tampered,The hard disk gap that is tampered is write back by defence program using not distorting of reading out again, it is ensured that the integrality in hard disk gap andCorrectness;If do not read out do not distort by defence program, download and write back to by defence program between hard disk from backup serverGap.
Second thread is read according to Preservation tactics, and to carrying out integrity measurement by defence program, detection is by defence programIt is no complete, if imperfect, downloaded from backup server by defence program, or carry out from local hard drive extensive by defence programIt is multiple.
By the integrity information of defence program described in Preservation tactics.
Step 3 is repeated, until computer shutdown.
To sum up, presently preferred embodiments of the present invention is these are only, is not intended to limit the scope of the present invention.It is allWithin the spirit and principles in the present invention, any modification, equivalent substitution and improvements made etc. should be included in the protection of the present inventionWithin the scope of.