CN105740095B - A kind of method and device of factory reset - Google Patents

A kind of method and device of factory reset Download PDF

Info

Publication number
CN105740095B
CN105740095B CN201610029759.1A CN201610029759A CN105740095B CN 105740095 B CN105740095 B CN 105740095B CN 201610029759 A CN201610029759 A CN 201610029759A CN 105740095 B CN105740095 B CN 105740095B
Authority
CN
China
Prior art keywords
file
system file
attribute
change
name
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.)
Active
Application number
CN201610029759.1A
Other languages
Chinese (zh)
Other versions
CN105740095A (en
Inventor
张双魁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Baishi Software (beijing) Co Ltd
Original Assignee
Baishi Software (beijing) Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Baishi Software (beijing) Co Ltd filed Critical Baishi Software (beijing) Co Ltd
Priority to CN201610029759.1A priority Critical patent/CN105740095B/en
Publication of CN105740095A publication Critical patent/CN105740095A/en
Application granted granted Critical
Publication of CN105740095B publication Critical patent/CN105740095B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1438Restarting or rejuvenating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a kind of method and devices of factory reset, are related to network security management field, exist in the prior art that factory reset is complex for operation step for solving, and the problem that recovery time is long.It include: that current environment file is stored as the first system file;Original backup file in setting regions is stored as second system file;According to the first system file and the second system file, confirm that the first system file and the second system file have the file of same file name, and the file in the first system file is the file of change, and the file of the change in the first system file is replaced to the file in the second system file with same file name.

Description

A kind of method and device of factory reset
Technical field
The present invention relates to network security management fields, more particularly relate to a kind of method and device of factory reset.
Background technique
Default setting is default conditions when article dispatches from the factory, for example, start interface, standby mode, key swift to operate, timing Remind etc..
Existing network security management equipment is usually that basic operating system environment is installed on the hardware device of customization, Then it pours into again and manages other, and, the default setting of setting generally all can be by as production Recovery card or similar ghost Disk Backup tool is backed up, and still, this backup scenario requires restarting equipment when restoring and has to specially Industry technical staff completes to operate, there are complex for operation step, and recovery time also long problem.
Summary of the invention
The embodiment of the present invention provides a kind of method and device of factory reset, extensive for solving to exist in the prior art Multiple default setting is complex for operation step, and the problem that recovery time is long.
The embodiment of the present invention provides a kind of method of factory reset, comprising:
Current environment file is stored as the first system file;
Original backup file in setting regions is stored as second system file;
According to the first system file and the second system file, the first system file and described second are confirmed System file has the file of same file name, and the file in the first system file is the file of change, The file of the change in the first system file is replaced to the institute in the second system file with same file name State file.
Preferably, including the file name of the first system file, first system in the first system file The store path of system file and the creation time information of the first system file.
Preferably, including the file name of the second system file, second system in the second system file The store path of system file and the creation time information of the second system file.
Preferably, described be stored as current environment file before the first system file, further includes:
The configuration file for modifying booting operating system program determines that recovery routine is that operating system nucleus starting is called Program.
The embodiment of the present invention also provides a kind of device of factory reset, comprising:
First storage unit, for current environment file to be stored as the first system file;
Second storage unit, for the original backup file in setting regions to be stored as second system file;
Comparison unit, for confirming the first system according to the first system file and the second system file File and the second system file have the file of same file name, and the file in the first system file For the file of change, the file of the change in the first system file, which is replaced, has phase in the second system file With the file of filename.
Preferably, including the file name of the first system file, first system in the first system file The store path of system file and the creation time information of the first system file.
Preferably, including the file name of the second system file, second system in the second system file The store path of system file and the creation time information of the second system file.
Preferably, first storage unit is also used to:
The configuration file for modifying booting operating system program determines that recovery routine is that operating system nucleus starting is called Program.
In the embodiment of the present invention, current environment file is stored as the first system file;It will be original standby in setting regions Part file is stored as second system file;According to the first system file and the second system file, confirmation described first System file and the second system file have the file of same file name, and described in the first system file File is the file of change, and the file of the change in the first system file is replaced in the second system file and is had There is the file of same file name.It, can be with according to the comparison of the first system file and second system file in above-described embodiment The system file for including in the system file and the first system file that include in second system file is compared, determines Difference between one system file and second system file the behaviour such as is deleted second system file, is replaced according to the difference Make, so as to simplify the tedious steps of default setting operation, and shortens the time that factory restores.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is a kind of method flow schematic diagram of factory reset provided in an embodiment of the present invention;
Fig. 2 is a kind of apparatus structure schematic diagram of factory reset provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
Fig. 1 illustratively shows a kind of method flow schematic diagram of factory reset provided in an embodiment of the present invention.
As shown in Figure 1, a kind of method of factory reset provided in an embodiment of the present invention, comprising the following steps:
Step 101, current environment file is stored as the first system file;
Step 102, the original backup file in setting regions is stored as second system file;
Step 103, according to the first system file and the second system file, confirm the first system file and The second system file has the file of same file name, and the file in the first system file is change File, the file of the change in the first system file is replaced and has same file in the second system file The file of name.
It should be noted that factory reset method provided in an embodiment of the present invention, needs to trigger recovery in client After the operation of starting, system just can factory reset.
Before step 101, the configuration file for needing first to modify booting operating system program determines that recovery routine is the behaviour Make the program that system kernel starting is called.For example, the configuration file of booting operating system program GRUB, here extensive are modified Multiple program restore is the init program called after operating system nucleus starts;Specific program are as follows: init=/bin/ Restore, has executed above procedure, and restarting systems start to execute recovery.
In a step 101, the file that current system executes is collected, the current system of collection is executed into file and is stored as first System file, wherein include the file name of the first system file, the store path of the first system file in the first system file With the temporal information for creating the first system file.
In a step 102, the original backup file in setting regions is collected, it will be original standby in the setting regions being collected into Part file is stored as second system file, wherein includes the file name of second system file, the second system in second system file The store path of system file and the temporal information for creating the second system file.
In step 103, the first system file and second system file are compared, from the first system file and second The difference of the first system file and second system file is found out in system file.
Wherein, the difference of the first system file and second system file includes the group of a kind of following mode or various ways It closes:
First way, the filename in the first system file is identical with the filename in second system file, but File in one system file is the file of change, and the file in second system file is the file of non-change.
The second way includes newly-increased system file in the first system file, but the newly-increased system file is not It is present in second system file.The file for including in the first system file, is not present in second system file.
Further, the comparison between the first system file and second system file is the first system there are also a kind of situation The attribute of file is identical with the attribute of second system file in file, i.e. file name and second in the first system file File name in system file is completely the same, and the file in the file and second system file in the first system file is all The file of change is all the file of non-change.If the file attribute of the first system file and second system file complete one It causes, then when carrying out the first system file and second system file compares, ignores the completely the same file of these attributes.
In above-described embodiment, described ignores, refer to these files without delete and replacement processing, however, it is desirable to Retain the consistent file of these attributes in the first system file and second system file.
According to the difference of above-mentioned the first system system file and second system file, to the first system file and second system File is handled.
Specifically, if the filename in the first system file is identical with the filename in second system file, but first File in system file is the file of change, and the file in second system file is the file of non-change.According to the above results, The file of change in the first system file is replaced to the non-change file in second system file.
Specifically, if including newly-increased system file in the first system file, but the newly-increased system file is not deposited It is in second system file.It is without any processing to second system file according to the above results, it can be by the first system file In increase newly system file delete, can also in the first system file increase newly system file it is without any processing.
Further, according to the comparing result of the first system file and second system file, to the first system file and Two system file has carried out corresponding processing, can reinstall the configuration file of booting operating system program.
It, can be according to the operating system reinstalled since the configuration file of booting operating system program reinstalls completion The configuration file of bootstrap, restarting systems, so that system factory reset.
In embodiments of the present invention, current environment file is stored as the first system file;It will be original in setting regions Backup file is stored as second system file;According to the first system file and the second system file, described the is confirmed One system file and the second system file have the file of same file name, and the institute in the first system file The file that file is change is stated, the file of the change in the first system file is replaced in the second system file The file with same file name.It, can according to the comparison of the first system file and second system file in above-described embodiment To compare the system file for including in second system file and the system file for including in the first system file, determine Difference between the first system file and second system file is deleted second system file, is replaced according to the difference Operation so as to simplify the tedious steps of default setting operation, and shortens the time that factory restores.
Based on the same inventive concept, the embodiment of the invention provides a kind of devices of factory reset, due to the device The principle for solving technical problem is similar to a kind of method of factory reset, therefore the implementation of the device may refer to method Implement, overlaps will not be repeated.
It as described in Figure 2, is a kind of apparatus structure schematic diagram of factory reset provided in an embodiment of the present invention, comprising: First storage unit 201, the second storage unit 202 and comparison unit 203.
First storage unit 201, for current environment file to be stored as the first system file;
Second storage unit 202, for the original backup file in setting regions to be stored as second system file;
Comparison unit 203, for confirming first system according to the first system file and the second system file System file and the second system file have the file of same file name, and the text in the first system file Part is the file of change, and the file of the change in the first system file, which is replaced in the second system file, to be had The file of same file name.
It preferably, include the file name of the first system file, first system in the first system file The store path of system file and the creation time information of the first system file.
It preferably, include the file name of the second system file, second system in the second system file The store path of system file and the creation time information of the second system file.
Preferably, first storage unit 201 is also used to:
The configuration file for modifying booting operating system program determines that recovery routine is that operating system nucleus starting is called Program.
It should be appreciated that the device of one of the above factory reset include unit only according to the apparatus realize The logical partitioning that function carries out in practical application, can carry out the superposition or fractionation of said units.And what the embodiment provided A kind of function that the device of factory reset is realized and a kind of method one of factory reset provided by the above embodiment One is corresponding, for the more detailed process flow that the device is realized, has been described in detail in above method embodiment one, It is not described in detail herein.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more, The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces The form of product.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
Although preferred embodiments of the present invention have been described, it is created once a person skilled in the art knows basic Property concept, then additional changes and modifications may be made to these embodiments.So it includes excellent that the following claims are intended to be interpreted as It selects embodiment and falls into all change and modification of the scope of the invention.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to include these modifications and variations.

Claims (8)

1. a kind of method of factory reset characterized by comprising
Current environment file is stored as the first system file;
Original backup file in setting regions is stored as second system file;
According to the first system file and the second system file, the first system file and second system file are compared Compared with the difference of the first system file and second system file being found out from the first system file and second system file, according to upper The difference for stating the first system file and second system file confirms that the first system file and the second system file have The file of same file name, and the file in the first system file is the file of change, by second system The file of the change in system file replaces the file in the first system file with same file name;
If including newly-increased system file in the first system file, but the newly-increased system file is not present in the second system It is without any processing to second system file according to the above results in system file, it can will be increased newly described in the first system file System file delete;
If the attribute of file is identical with the attribute of file in second system file in the first system file, first is being carried out When system file and second system file compare, ignore the identical file of the attribute;The complete phase of the attribute of the file Title with i.e. file described in the title of file described in the first system file and second system file is completely the same, and first File described in file described in system file and second system file all be change file or be all non-change file; It is described ignore the identical file of the attribute i.e. to the identical file of the attribute without delete and replacement handle, But retain the identical file of attribute.
2. the method as described in claim 1, which is characterized in that include the first system text in the first system file The file name of part, the creation time information of the store path of the first system file and the first system file.
3. the method as described in claim 1, which is characterized in that include the second system text in the second system file The file name of part, the creation time information of the store path of the second system file and the second system file.
4. the method as described in claim 1, which is characterized in that it is described by current environment file be stored as the first system file it Before, further includes:
The configuration file for modifying booting operating system program determines that recovery routine is that journey is called in operating system nucleus starting Sequence.
5. a kind of device of factory reset characterized by comprising
First storage unit, for current environment file to be stored as the first system file;
Second storage unit, for the original backup file in setting regions to be stored as second system file;
Comparison unit is used for according to the first system file and the second system file, by the first system file and second System file is compared, and finds out the first system file and second system file from the first system file and second system file Difference the first system file and described are confirmed according to the difference of above-mentioned the first system file and second system file Two system file has the file of same file name, and the file in the first system file is the text of change Part, the file of the change in the second system file, which is replaced, has same file name in the first system file The file;
If including newly-increased system file in the first system file, but the newly-increased system file is not present in the second system It is without any processing to second system file according to the above results in system file, it can will be increased newly described in the first system file System file delete;
If the attribute of file is identical with the attribute of file in second system file in the first system file, first is being carried out When system file and second system file compare, ignore the identical file of the attribute;The complete phase of the attribute of the file Title with i.e. file described in the title of file described in the first system file and second system file is completely the same, and first File described in file described in system file and second system file all be change file or be all non-change file; It is described ignore the identical file of the attribute i.e. to the identical file of the attribute without delete and replacement handle, But retain the identical file of attribute.
6. device as claimed in claim 5, which is characterized in that include the first system text in the first system file The file name of part, the creation time information of the store path of the first system file and the first system file.
7. device as claimed in claim 5, which is characterized in that include the second system text in the second system file The file name of part, the creation time information of the store path of the second system file and the second system file.
8. device as claimed in claim 5, which is characterized in that first storage unit is also used to: modification operating system is drawn The configuration file of lead sequence determines that recovery routine is that the operating system nucleus starts caller.
CN201610029759.1A 2016-01-01 2016-01-01 A kind of method and device of factory reset Active CN105740095B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610029759.1A CN105740095B (en) 2016-01-01 2016-01-01 A kind of method and device of factory reset

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610029759.1A CN105740095B (en) 2016-01-01 2016-01-01 A kind of method and device of factory reset

Publications (2)

Publication Number Publication Date
CN105740095A CN105740095A (en) 2016-07-06
CN105740095B true CN105740095B (en) 2019-07-02

Family

ID=56246316

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610029759.1A Active CN105740095B (en) 2016-01-01 2016-01-01 A kind of method and device of factory reset

Country Status (1)

Country Link
CN (1) CN105740095B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108804257B (en) * 2018-06-01 2021-12-24 Oppo广东移动通信有限公司 Terminal state detection method and device, terminal and storage medium
CN112527327A (en) * 2020-12-07 2021-03-19 苏州浪潮智能科技有限公司 Method, system, terminal and storage medium for factory restoration of UOS operating system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102799500A (en) * 2012-06-25 2012-11-28 腾讯科技(深圳)有限公司 System repair method, device and storage medium
CN104133706A (en) * 2014-08-01 2014-11-05 珠海全志科技股份有限公司 Firmware modifying method and device
CN104932955A (en) * 2015-05-29 2015-09-23 深圳市创维电器科技有限公司 Method for backing up data during factory setting restoring of mobile terminal, and mobile terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10152601B2 (en) * 2014-06-05 2018-12-11 International Business Machines Corporation Reliably recovering stored data in a dispersed storage network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102799500A (en) * 2012-06-25 2012-11-28 腾讯科技(深圳)有限公司 System repair method, device and storage medium
CN104133706A (en) * 2014-08-01 2014-11-05 珠海全志科技股份有限公司 Firmware modifying method and device
CN104932955A (en) * 2015-05-29 2015-09-23 深圳市创维电器科技有限公司 Method for backing up data during factory setting restoring of mobile terminal, and mobile terminal

Also Published As

Publication number Publication date
CN105740095A (en) 2016-07-06

Similar Documents

Publication Publication Date Title
US9367598B2 (en) Merging an out of synchronization indicator and a change recording indicator in response to a failure in consistency group formation
US10379963B2 (en) Methods and apparatus for managing a large-scale environment of copy data management appliances
US9251230B2 (en) Exchanging locations of an out of synchronization indicator and a change recording indicator via pointers
US20140082167A1 (en) Provision of backup functionalities in cloud computing systems
CN103473277A (en) Snapshot method and device for file systems
US10067836B1 (en) Configuration based intelligent protection modeling
CN105224422B (en) A kind of data back up method and equipment
CN104809025A (en) Method and device for enabling programs to be online
US10204021B2 (en) Recovery of an infected and quarantined file in a primary storage controller from a secondary storage controller
US9699252B2 (en) Deployment of virtual machine disks from a shared network file system
CN109074249B (en) Policy driven flight management
CN105302922B (en) A kind of distributed file system snapshot implementing method
US8612799B2 (en) Method and apparatus of backing up subversion repository
US20210117295A1 (en) Generating standby cloud versions of a virtual machine
US20230023053A1 (en) Data loss recovery in a secondary storage controller from a primary storage controller
CN111125065A (en) Visual data synchronization method, system, terminal and computer readable storage medium
CN105740095B (en) A kind of method and device of factory reset
CN109814946A (en) A kind of method and apparatus for realizing distributed storage in XenServer
CN109634625A (en) A kind of OpenStack dispositions method and system based on Clonezilla
CN111381931A (en) Disaster recovery method, device and system
US20180246648A1 (en) Continuous disaster protection for migrated volumes of data
US20240020209A1 (en) Automatically implementing a specification of a data protection intent
KR20150124653A (en) System for monitoring and controling electric power system for process verification
US10635636B1 (en) Hyper-V virtual machine synthetic full backup where user and recovery snapshots coexist
CN103902663A (en) File synchronization method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
DD01 Delivery of document by public notice

Addressee: BAISHI SOFTWARE (BEIJING) Co.,Ltd. Person in charge of patents

Document name: payment instructions

DD01 Delivery of document by public notice