CN105740095A - Method and apparatus for restoring factory settings - Google Patents

Method and apparatus for restoring factory settings Download PDF

Info

Publication number
CN105740095A
CN105740095A CN201610029759.1A CN201610029759A CN105740095A CN 105740095 A CN105740095 A CN 105740095A CN 201610029759 A CN201610029759 A CN 201610029759A CN 105740095 A CN105740095 A CN 105740095A
Authority
CN
China
Prior art keywords
file
system file
files
name
stored
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.)
Granted
Application number
CN201610029759.1A
Other languages
Chinese (zh)
Other versions
CN105740095B (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 method and apparatus for restoring factory settings, relates to the field of network safety management, and is used for solving the problems of fussy operation steps of restoring the factory settings and long restoring time in the prior art. The method comprises the steps of: storing current environment files as first system files; storing original backup files in a set area as second system files; and according to the first system files and the second system files, confirming files of the first system files and the second system files, which have the same file names, wherein the files in the first system files are modified files, and replacing the files in the second system files, which have the same file names, with the modified files in the first system files.

Description

A kind of method of factory reset and device
Technical field
The present invention relates to network security management field, more particularly relate to method and the device of a kind of factory reset.
Background technology
Default Value is article default conditions when dispatching from the factory, and such as, starts interface, standby mode, key swift to operate, timed reminding etc..
Existing network security management equipment usually installs basic operating system environment on the hardware device of customization, then pour into again and manage other, and, the Default Value arranged generally all can be backed-up by making Recovery card or the such Disk Backup instrument of similar ghost, but, this backup scenario is required for the equipment that restarts when recovering and have to professional and technical personnel operate, and there is complex operation step and the problem that recovery time is also long.
Summary of the invention
The embodiment of the present invention provides method and the device of a kind of factory reset, is used for solving there is factory reset complex operation step in prior art, and the problem that recovery time is long.
The embodiment of the present invention provides a kind of method of factory reset, including:
Current environment file is stored as the first system file;
Original backup file in setting regions is stored as second system file;
According to described the first system file and described second system file, confirm that described the first system file and described second system file have the described file of same file name, and the described file in described the first system file is the file changed, the file of the described change in described the first system file is replaced the described file in described second system file with same file name.
It is preferred that include the file name of described the first system file in described the first system file, the store path of described the first system file and the establishment temporal information of described the first system file.
It is preferred that include the file name of described second system file in described second system file, the store path of described second system file and the establishment temporal information of described second system file.
It is preferred that described current environment file is stored as the first system file before, also include:
The configuration file of amendment booting operating system program, it is determined that recovery routine is that described operating system nucleus starts caller.
The embodiment of the present invention also provides for the device of a kind of factory reset, including:
First memory element, for being stored as the first system file by current environment file;
Second memory element, for being stored as second system file by the original backup file in setting regions;
Contrast unit, for according to described the first system file and described second system file, confirm that described the first system file and described second system file have the described file of same file name, and the described file in described the first system file is the file changed, the file of the described change in described the first system file is replaced the described file in described second system file with same file name.
It is preferred that include the file name of described the first system file in described the first system file, the store path of described the first system file and the establishment temporal information of described the first system file.
It is preferred that include the file name of described second system file in described second system file, the store path of described second system file and the establishment temporal information of described second system file.
It is preferred that described first memory element is additionally operable to:
The configuration file of amendment booting operating system program, it is determined that recovery routine is that described operating system nucleus starts caller.
In the embodiment of the present invention, current environment file is stored as the first system file;Original backup file in setting regions is stored as second system file;According to described the first system file and described second system file, confirm that described the first system file and described second system file have the described file of same file name, and the described file in described the first system file is the file changed, the file of the described change in described the first system file is replaced the described file in described second system file with same file name.In above-described embodiment, contrast according to the first system file and second system file, the system file included in the system file included in second system file and the first system file can be contrasted, determine the difference between the first system file and second system file, according to this difference, second system file is deleted, replacement etc. operates, such that it is able to simplify the tedious steps of Default Value operation, and shortens the time recovered of dispatching from the factory.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, the accompanying drawing used required in embodiment or description of the prior art will be briefly described below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the premise not paying creative work, it is also possible to obtain other accompanying drawing according to these accompanying drawings.
The method flow schematic diagram of a kind of factory reset that Fig. 1 provides for the embodiment of the present invention;
The apparatus structure schematic diagram of a kind of factory reset that Fig. 2 provides for the embodiment of the present invention.
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is only a part of embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, the every other embodiment that those of ordinary skill in the art obtain under not making creative work premise, broadly fall into the scope of protection of the invention.
The method flow schematic diagram of a kind of factory reset that the embodiment of the present invention that what Fig. 1 was exemplary illustrate provides.
As it is shown in figure 1, the method for a kind of factory reset of embodiment of the present invention offer, comprise the following steps:
Step 101, is stored as the first system file by current environment file;
Step 102, is stored as second system file by the original backup file in setting regions;
Step 103, according to described the first system file and described second system file, confirm that described the first system file and described second system file have the described file of same file name, and the described file in described the first system file is the file changed, the file of the described change in described the first system file is replaced the described file in described second system file with same file name.
It should be noted that the factory reset method that the embodiment of the present invention provides, it is necessary to after client triggers the operation recovering to start, system just can factory reset.
Before step 101, it is necessary to first revise the configuration file of booting operating system program, it is determined that recovery routine is that this operating system nucleus starts the program called.For example, the configuration file of amendment booting operating system program GRUB, recovery routine restore here is the init program called after operating system nucleus starts;Concrete program is: init=/bin/restore, has performed said procedure, restarting systems, starts to perform recovery.
In a step 101, collect the file that current system performs, the current system of collection is performed file and is stored as the first system file, wherein, the first system file includes the file name of the first system file, the temporal information of the store path of the first system file and this first system file of establishment.
In a step 102, collect the original backup file in setting regions, original backup file in the setting regions collected is stored as second system file, wherein, second system file includes the file name of second system file, the temporal information of the store path of second system file and this second system file of establishment.
In step 103, the first system file and second system file are compared, from the first system file and second system file, find out the first system file and the difference of second system file.
Wherein, the difference of the first system file and second system file includes the combination of following a kind of mode or various ways:
First kind of way, the filename in the first system file is identical with the filename in second system file, but the file in the first system file is the file changed, and the file in second system file is the file of non-change.
The second way, the first system file includes the system file increased newly, but this newly-increased system file is not present in second system file.Namely the file that the first system file includes, is not present in second system file.
Further, comparison between the first system file and second system file, also a kind of situation is, the attribute of the first system file file is identical with the attribute of second system file, namely the file name in the first system file and the file name in second system file are completely the same, and the file in the first system file and the file in second system file are all the file changed or are all the file of non-change.If the file attribute of the first system file and second system file is completely the same, then, when carrying out the first system file and the contrast of second system file, ignore the on all four file of these attributes.
In above-described embodiment, described ignores, and refers to and these files is not deleted and replacement process, however, it is desirable to retain, in the first system file with second system file, the file that these attributes are consistent.
Difference according to above-mentioned the first system system file and second system file, processes the first system file and second system file.
Specifically, if the filename in the first system file is identical with the filename in second system file, but the file in the first system file is the file changed, and the file in second system file is the file of non-change.According to the above results, the file of the change in the first system file is replaced the non-change file in second system file.
Specifically, if the first system file includes the system file increased newly, but this newly-increased system file is not present in second system file.According to the above results, second system file is left intact, it is possible to system file newly-increased in the first system file is deleted, it is also possible to system file newly-increased in the first system file is left intact.
Further, the comparing result according to the first system file and second system file, the first system file and second system file are carried out corresponding process, it is possible to reinstall the configuration file of booting operating system program.
Owing to the configuration file of booting operating system program has been reinstalled, it is possible to the configuration file according to the booting operating system program reinstalled, restarting systems, so that system recovery Default Value.
In embodiments of the present invention, current environment file is stored as the first system file;Original backup file in setting regions is stored as second system file;According to described the first system file and described second system file, confirm that described the first system file and described second system file have the described file of same file name, and the described file in described the first system file is the file changed, the file of the described change in described the first system file is replaced the described file in described second system file with same file name.In above-described embodiment, contrast according to the first system file and second system file, the system file included in the system file included in second system file and the first system file can be contrasted, determine the difference between the first system file and second system file, according to this difference, second system file is deleted, replacement etc. operates, such that it is able to simplify the tedious steps of Default Value operation, and shortens the time recovered of dispatching from the factory.
Based on same inventive concept, embodiments provide the device of a kind of factory reset, owing to the principle of this device solution technical problem is similar to a kind of method of factory reset, therefore the enforcement of this device may refer to the enforcement of method, repeats part and repeats no more.
As described in Figure 2, for the apparatus structure schematic diagram of a kind of factory reset that the embodiment of the present invention provides, including: the first memory element 201, the second memory element 202 and contrast unit 203.
First memory element 201, for being stored as the first system file by current environment file;
Second memory element 202, for being stored as second system file by the original backup file in setting regions;
Contrast unit 203, for according to described the first system file and described second system file, confirm that described the first system file and described second system file have the described file of same file name, and the described file in described the first system file is the file changed, the file of the described change in described the first system file is replaced the described file in described second system file with same file name.
Preferably, in described the first system file, include the file name of described the first system file, the store path of described the first system file and the establishment temporal information of described the first system file.
Preferably, in described second system file, include the file name of described second system file, the store path of described second system file and the establishment temporal information of described second system file.
Preferably, described first memory element 201 is additionally operable to:
The configuration file of amendment booting operating system program, it is determined that recovery routine is that described operating system nucleus starts caller.
Should be appreciated that the unit that the device of one of the above factory reset includes is only the logical partitioning that the function realized according to this apparatus carries out, in practical application, it is possible to carry out superposition or the fractionation of said units.And the method one_to_one corresponding of a kind of factory reset that the function that the device of a kind of factory reset that this embodiment provides realizes provides with above-described embodiment, for the handling process specifically that this device realizes, said method embodiment one is described in detail, is not described in detail herein.
Those skilled in the art are it should be appreciated that embodiments of the invention can be provided as method, system or computer program.Therefore, the present invention can adopt the form of complete hardware embodiment, complete software implementation or the embodiment in conjunction with software and hardware aspect.And, the present invention can adopt the form at one or more upper computer programs implemented of computer-usable storage medium (including but not limited to disk memory, CD-ROM, optical memory etc.) wherein including computer usable program code.
The present invention is that flow chart and/or block diagram with reference to method according to embodiments of the present invention, equipment (system) and computer program describe.It should be understood that can by the combination of the flow process in each flow process in computer program instructions flowchart and/or block diagram and/or square frame and flow chart and/or block diagram and/or square frame.These computer program instructions can be provided to produce a machine to the processor of general purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device so that the instruction performed by the processor of computer or other programmable data processing device is produced for realizing the device of function specified in one flow process of flow chart or multiple flow process and/or one square frame of block diagram or multiple square frame.
These computer program instructions may be alternatively stored in and can guide in the computer-readable memory that computer or other programmable data processing device work in a specific way, the instruction making to be stored in this computer-readable memory produces to include the manufacture of command device, and this command device realizes the function specified in one flow process of flow chart or multiple flow process and/or one square frame of block diagram or multiple square frame.
These computer program instructions also can be loaded in computer or other programmable data processing device, make on computer or other programmable devices, to perform sequence of operations step to produce computer implemented process, thus the instruction performed on computer or other programmable devices provides for realizing the step of function specified in one flow process of flow chart or multiple flow process and/or one square frame of block diagram or multiple square frame.
Although preferred embodiments of the present invention have been described, but those skilled in the art are once know basic creative concept, then these embodiments can be made other change and amendment.So, claims are intended to be construed to include preferred embodiment and fall into all changes and the amendment of the scope of the invention.
Obviously, the present invention can be carried out various change and modification without deviating from the spirit and scope of the present invention by those skilled in the art.So, if these amendments of the present invention and modification belong within the scope of the claims in the present invention and equivalent technologies thereof, then the present invention is also intended to comprise these change and modification.

Claims (8)

1. the method for a factory reset, it is characterised in that including:
Current environment file is stored as the first system file;
Original backup file in setting regions is stored as second system file;
According to described the first system file and described second system file, confirm that described the first system file and described second system file have the described file of same file name, and the described file in described the first system file is the file changed, the file of the described change in described the first system file is replaced the described file in described second system file with same file name.
2. the method for claim 1, it is characterised in that include the file name of described the first system file in described the first system file, the store path of described the first system file and the establishment temporal information of described the first system file.
3. the method for claim 1, it is characterised in that include the file name of described second system file in described second system file, the store path of described second system file and the establishment temporal information of described second system file.
4. the method for claim 1, it is characterised in that described current environment file is stored as the first system file before, also include:
The configuration file of amendment booting operating system program, it is determined that recovery routine is that described operating system nucleus starts caller.
5. the device of a factory reset, it is characterised in that including:
First memory element, for being stored as the first system file by current environment file;
Second memory element, for being stored as second system file by the original backup file in setting regions;
Contrast unit, for according to described the first system file and described second system file, confirm that described the first system file and described second system file have the described file of same file name, and the described file in described the first system file is the file changed, the file of the described change in described the first system file is replaced the described file in described second system file with same file name.
6. device as claimed in claim 5, it is characterised in that include the file name of described the first system file in described the first system file, the store path of described the first system file and the establishment temporal information of described the first system file.
7. device as claimed in claim 5, it is characterised in that include the file name of described second system file in described second system file, the store path of described second system file and the establishment temporal information of described second system file.
8. device as claimed in claim 5, it is characterised in that described first memory element is additionally operable to:
The configuration file of amendment booting operating system program, it is determined that recovery routine is that described 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 true CN105740095A (en) 2016-07-06
CN105740095B 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)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108804257A (en) * 2018-06-01 2018-11-13 Oppo广东移动通信有限公司 SOT state of termination detection method, 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 (4)

* 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
US20150355979A1 (en) * 2014-06-05 2015-12-10 Cleversafe, Inc. Accessing data based on a dispersed storage network rebuilding issue

Patent Citations (4)

* 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
US20150355979A1 (en) * 2014-06-05 2015-12-10 Cleversafe, Inc. Accessing data based on a dispersed storage network rebuilding issue
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

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108804257A (en) * 2018-06-01 2018-11-13 Oppo广东移动通信有限公司 SOT state of termination detection method, device, terminal and storage medium
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

Also Published As

Publication number Publication date
CN105740095B (en) 2019-07-02

Similar Documents

Publication Publication Date Title
US9405630B2 (en) Methods and apparatus to perform site recovery of a virtual data center
CN103473277B (en) The Snapshot Method and device of file system
US11397649B2 (en) Generating standby cloud versions of a virtual machine
CN110262873B (en) Configuration modification method and device for container application, computer equipment and storage medium
EP3474143B1 (en) Method and apparatus for incremental recovery of data
CN111324606B (en) Data slicing method and device
CN111897558A (en) Kubernets upgrading method and device for container cluster management system
EP2187695A1 (en) Method, device and system for realizing task in cluster environment
US8612799B2 (en) Method and apparatus of backing up subversion repository
CN103716384A (en) Method and device for realizing cloud storage data synchronization in cross-data-center manner
CN105867962A (en) System upgrading method and device
CN104484240A (en) Method and device for storing terminal data
CN106325909B (en) Method and system for updating multiple images in private cloud system
CN109165210A (en) A kind of method and device of cluster Hbase Data Migration
CN105740095A (en) Method and apparatus for restoring factory settings
CN112667259A (en) SDN controller version upgrading method, device and medium
US10635636B1 (en) Hyper-V virtual machine synthetic full backup where user and recovery snapshots coexist
CN103034636A (en) Roll-back method, device and system of non relational database
CN114995958A (en) Virtualization platform information consistency control method, device and medium
CN115080309A (en) Data backup system, method, storage medium, and electronic device
CN105701162B (en) Management method for user data partition of intelligent terminal and intelligent terminal
CN110515916B (en) Master-slave distributed file processing method, master node, slave node and system
CN114546586A (en) Container resource limiting, fault monitoring and recovering method
CN105765908B (en) A kind of multi-site automatic update method, client and system
CN104809033A (en) Backup method and system

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
DD01 Delivery of document by public notice

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

Document name: payment instructions