A kind of system automatic recovery method
Technical field
The system that the present invention relates to is recovered automatically, relates in particular to a kind ofly under the situation that does not have Input/Output Device (keyboard, display etc.), need not auxiliary " 0 " the mutual system's automatic recovery method of client software, belongs to computer software technical field.
Background technology
Along with the continuous development of computer technology, the memory technology that is used for server has originally edged close to family and medium-sized and small enterprises through improvement and expansion.Such as, present popular Windows Home Server and Free NAS system.These storage ends do not have Input/Output Device (keyboard, display etc.).Usually dispose good system when using at ordinary times, the storage end only connects a power lead and netting twine, and power lead is given the power supply of storage end, and the mutual and telemanagement of user's data is all finished by netting twine.In this case, maintenance and management storage end system is a cumbersome thing, particularly breaks down when storing end system, and in the time of can not entering system, telemanagement software can't start at all, safeguards just to seem powerless.
If safeguard the failed storage end, two kinds of ways are arranged usually, the one, manage to connect required peripheral hardware (keyboard, display etc.), and then safeguard; The 2nd, develop a client maintenance software, carry out remote maintenance (have need hardware supported), for example Windows Home Server in conjunction with maintenance software then.These two kinds of methods all need man-machine interactively, and the realization that has is more complicated also, not only increases cost of development, and the process complexity needs the professional just can finish.
Summary of the invention
The objective of the invention is to overcome problems of the prior art, propose a kind of " 0 " mutual storage end system automatic recovery method, described method also can be used for General System.
This method application start boot and system recovery technique realization " 0 " mutual system are recovered automatically, neither need to develop client software, do not influence system stability again.
The inventive method comprises following content:
Behind the system boot, start an intelligently guiding module, described module comprises " the normal startup " and " system recovery " two boot entries; When described boot entry is " the normal startup ", normal start-up system, boot entry is set to " system recovery ", and whether detection system is normally moved after startup, if normal operation, then boot entry is set to " normal startup ", if not system is then restarted in normal operation; When described boot entry is " system recovery ", be standby system with described system recovery, boot entry is set to " the normal startup " behind the system recovery.
Wherein, after the system start-up, can by by described system (such as, detection module in the system) whether normally each service routine of operational system detects the operation of described system automatically, if the trouble-free operation of described service routine energy, then system normally starts, otherwise thinks that system normally starts.
Described service routine can comprise: the infrastructure service of operating system (as the explorer of Windows), FTP service, WEB service, mail service, database service, telemanagement service, suchlike service routine.
Wherein, when detecting system's abnormal running, can automatic or manual mode restart system, such as, when system can normally restart automatically, can restart by above-mentioned detection module control, when (such as crashing) can't normally be restarted in system, then by manually restarting.
Wherein, after detect determining the normal operation of system,, be the last system that can normally move after after testing with the system after guaranteeing to recover with the described standby system of the system update of described normal operation.
Certainly, described standby system also can be the specific standby system that the user sets, and is high-test security system with the system after guaranteeing to recover, and gets rid of the mistake that testing process itself may exist.
Fig. 1 has provided the procedure of the inventive method example and has described.
Compare with prior art, advantage of the present invention is:
1. application technical solution of the present invention, system are finished recovery automatically, and real realize " 0 " is mutual;
2. application technical solution of the present invention, it is auxiliary to need not client software, based on the B/S framework, uses convenient, simple;
3. application technical solution of the present invention need not the specific installation support, can realize highly versatile on multi-purpose computer;
In addition, the inventive method also has following effect:
1. when the user finds the malfunction of storage end, only need restart the storage end;
2. if the storage end system is no problem, the storage end will restart, and the beginning services;
3. if the collapse of storage end system can't enter system, when the storage end is restarted once more, will enter maintenance system according to starting the option that is provided with last time, and automatic recovery system, restarting after recovering to finish, system will enter into normal system and start working;
4. all processes need not Input/Output Device and carry out alternately.
Description of drawings
Fig. 1 is the inventive method process flow diagram.
Embodiment
Further specify the inventive method below by embodiment.
Present embodiment storage end system is composed as follows:
First: Grub+ revises the startupoptions function;
Second portion: FreeNAS system+service;
Third part: revise the startupoptions function;
The backup of the automatic operating file of the 4th part: DOS++Ghost+ system+restart.
Form according to said system, present embodiment storage end adopts following deployment:
1. multi-purpose computer is divided into three parts with hard disk:
A) first subregion 100M installs DOS and Ghost system; (this subregion can use the HPA technology generation to replace);
B) second subregion 100M installs FreeNAS and Grub system;
C) remaining space is as data partition;
2.FreeNAS requirement is set:
A) machine FreeNAS by name, IP is the DHCP mode;
B) after the system start-up, directly can be by the machine name access system;
3. revise Grub, make first option point to the FreeNAS system, second option points to the DOS recovery system;
Editor Grub, achieve each startupoptions one after, point to option two automatically;
5. initialization FreeNAS, and write one with the script of operation automatically after the system start-up, each service routine of this script startup;
6.FreeNAS after system and service start, move the Intelligent Measurement module at last and realize revising the Grub option, make it point to option one;
With the system that sets up as " system of normal operation ", and it is backuped to first subregion, make the DOS system can recover it;
8. the automatic operating file autoexec.bat of editor DOS system achieves the system reducing that automatically the 7th step was backed up, and restarts;
9. revise BIOS, it can normally be started under peripheral hardware situations such as mouse, keyboard not having.
10. operation: plug in, netting twine, pull out other unwanted peripheral hardwares, start computing machine, system promptly realizes.