CN114443370A - Data restoration method, device and medium - Google Patents

Data restoration method, device and medium Download PDF

Info

Publication number
CN114443370A
CN114443370A CN202210111500.7A CN202210111500A CN114443370A CN 114443370 A CN114443370 A CN 114443370A CN 202210111500 A CN202210111500 A CN 202210111500A CN 114443370 A CN114443370 A CN 114443370A
Authority
CN
China
Prior art keywords
data
backup
restored
file
target 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.)
Pending
Application number
CN202210111500.7A
Other languages
Chinese (zh)
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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202210111500.7A priority Critical patent/CN114443370A/en
Publication of CN114443370A publication Critical patent/CN114443370A/en
Pending legal-status Critical Current

Links

Images

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/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • G06F11/1451Management of the data involved in backup or backup restore by selection of backup contents

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 application discloses a data reduction method, a device and a medium, comprising the following steps: acquiring a backup file and analyzing the backup file to acquire backup data so as to restore system data according to the backup data; and judging whether the current state of the system to be restored meets a first preset condition, if so, deleting the original data corresponding to the backup data, wherein the original data is the data in the system to be restored, so as to prevent the original data from being wrong or not matched with the restored data and influencing the normal work of the system. And restoring all data of the system to be restored according to the backup data so as to ensure that the system can work normally. Therefore, the data restoring method provided by the application can be used for preventing the system from being incapable of working normally due to the fact that the original data are wrong or the original data are not matched with the restored data by deleting the original data in the system when the preset conditions are met.

Description

Data restoration method, device and medium
Technical Field
The present application relates to the field of computer storage, and in particular, to a data restoring method, apparatus, and medium.
Background
In the working process of a computer, in order to ensure that the computer can normally work when data is lost or damaged, the data needs to be restored according to backup information, and a currently common data restoration method is to restore only the data which is lost or damaged in a computer system and skip the existing data.
However, when data is lost or damaged, the original data that is not lost may have errors or the original data may not match the restored data, which may result in data restoration failure and even failure of the system after data restoration.
Therefore, how to prevent the data restoration failure in the data restoration process is an urgent problem to be solved by those skilled in the art.
Disclosure of Invention
The application aims to provide a data recovery method, a data recovery device and a data recovery medium, so as to prevent data recovery failure.
In order to solve the above technical problem, the present application provides a data restoring method, including:
acquiring a backup file and analyzing the backup file to acquire backup data;
judging whether the current state of the system to be restored meets a first preset condition or not;
if yes, determining target data according to the backup data and deleting the target data, wherein the target data are original data in the system to be restored;
and restoring all the data of the system to be restored according to the backup data.
Preferably, the first preset condition includes:
and detecting that the user triggers the operation of deleting the target data, and/or the state of the target data meets a second preset condition.
Preferably, the determining the target data according to the backup data includes:
judging whether preset target data exist in the backup data or not;
if the target data exists, determining the original data corresponding to the preset target data as the target data;
if not, determining all the original data corresponding to the backup data as the target data.
Preferably, after the step of deleting the target data, the method further includes:
judging whether the target data is deleted or not;
if not, judging whether the process for executing the deleting operation has the file deleting authority or not;
if the file deletion authority is not available, the file deletion authority is granted to the process executing the deletion operation;
if the file deletion authority exists, first early warning information is sent to a manager;
and if the backup data is deleted, the step of restoring all the data of the system to be restored according to the backup data is carried out.
Preferably, the obtaining the backup file includes:
judging whether a backup file library has the backup file with a preset version or not;
if yes, obtaining the backup file of the preset version;
and if the backup file does not exist, acquiring the backup file of the latest version.
Preferably, after the step of restoring all the data of the system to be restored according to the backup data, the method further includes:
judging whether the reduction is successful;
if the restoration is not successful, judging whether the failure reason is that the original data already exists;
and if the original data do not exist, sending second early warning information to the manager.
Preferably, after the step of restoring all the data of the system to be restored according to the backup data, the method further includes:
and generating a restoration report to record the information of the restored data in the system to be restored.
In order to solve the above technical problem, the present application further provides a data restoring apparatus, including:
the analysis module is used for acquiring a backup file and analyzing the backup file to acquire backup data;
the judging module is used for judging whether the current state of the system to be restored meets a first preset condition or not;
the deleting module is used for determining target data according to the backup data and deleting the target data if the backup data is met, wherein the target data is original data in the system to be restored;
and the restoring module is used for restoring all the data of the system to be restored according to the backup data.
In order to solve the above technical problem, the present application further provides a data restoring apparatus, including a memory for storing a computer program;
and the processor is used for realizing the steps of the data restoration method when executing the computer program.
In order to solve the above technical problem, the present application further provides a computer-readable storage medium, where a computer program is stored, and the computer program, when executed by a processor, implements the steps of the data restoring method.
The application provides a data reduction method, which comprises the following steps: acquiring a backup file and analyzing the backup file to acquire backup data so as to restore system data according to the backup data; and judging whether the current state of the system to be restored meets a first preset condition, if so, deleting the original data corresponding to the backup data, wherein the original data is the data in the system to be restored, so as to prevent the original data from being wrong or not matched with the restored data and influencing the normal work of the system. And restoring all data of the system to be restored according to the backup data so as to ensure that the system can work normally. Therefore, the data restoring method provided by the application can prevent the situation that the system cannot work normally due to the fact that the original data are wrong or the original data are not matched with the restored data by deleting the original data in the system when the preset condition is met.
In addition, the application also provides a data reduction device and a medium, which correspond to the method and have the same effects.
Drawings
In order to more clearly illustrate the embodiments of the present application, the drawings needed for the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings can be obtained by those skilled in the art without inventive effort.
Fig. 1 is a flowchart of a data reduction method according to an embodiment of the present application;
fig. 2 is a structural diagram of a data reduction device according to an embodiment of the present application;
fig. 3 is a structural diagram of a data recovery apparatus according to another embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without any creative effort belong to the protection scope of the present application.
The core of the application is to provide a data reduction method, a device and a medium.
In order that those skilled in the art will better understand the disclosure, the following detailed description will be given with reference to the accompanying drawings.
In a computer data recovery application scenario, due to a computer operation failure or a malicious attack, data in a computer system may be lost or damaged, and in this case, if only the lost or damaged data is restored, a situation that original data is not matched with the restored data or the original data has an insignificant error may occur, which affects normal operation of the system. According to the data restoration method, when a first preset condition is met (for example, a user triggers an operation of deleting target data or the target data meets a second preset condition), the target data is deleted and all data in the system to be restored are restored according to backup data, and if the first preset condition is not met, the data to be restored in the target system are directly restored. According to the scheme provided by the application, the original data in the system is deleted when the preset condition is met, so that the situation that the system cannot work normally due to the fact that the original data is wrong or the original data is not matched with the restored data is prevented. Meanwhile, when the original data are determined to have no errors, the step of deleting the target data can be skipped, and the data in the system to be restored can be directly restored, so that the data restoring process is simpler and quicker.
Fig. 1 is a flowchart of a data restoring method according to an embodiment of the present application, and as shown in fig. 1, the data restoring method includes:
s10: and acquiring the backup file and analyzing the backup file to acquire backup data.
In a specific implementation, the backup file may be stored in a local storage device, or may be stored in a cloud server. It can be understood that the former method is more convenient and reliable, is less affected by the environment, can still ensure the normal operation of the data restoration work when the computer can not be connected with the network, but needs to be configured with an additional storage device when more backup files exist, thus increasing the system cost; the latter mode can better ensure the safety of the backup files and can update the backup files in time.
It should be noted that the backup file mentioned in this application document may be a backup of all files and data in the system, and may also be a backup of data of a certain application in the system, which is not limited herein. If the backup is of a certain application, the target data and the original data mentioned in the application are only data corresponding to the application.
It can be understood that, if the backup file is stored in the remote server, the downloaded backup file needs to be checked (for example, hash check) when the backup file is acquired, so as to ensure the integrity of the backup file. The obtained backup file may be a resource package of a version specified by the user, or may be a resource package of the latest version, which is not limited herein.
S11: and judging whether the state of the system to be restored meets a first preset condition or not.
It can be understood that, since the manner of deleting the original data in the system and completely restoring needs to occupy a large amount of computing resources, the operation of completely restoring can be performed only when the files in the system meet the first preset condition. For example: when the user can not judge whether the original data has errors, the original data in the system can be deleted in a manual operation mode and all the original data are restored; or when the system detects that the original data is abnormal, deleting the original data in the system and completely restoring the original data.
In this embodiment, the method for the system to determine whether the original data is abnormal is not limited. Whether the original data is abnormal or not can be judged by judging whether the check bit or the time stamp in the original data is correct or not.
S12: and if so, determining target data according to the backup data and deleting the target data, wherein the target data is the original data in the system to be restored.
In specific implementation, if a first preset condition is met, target data corresponding to backup data in a system to be restored is determined. It can be understood that, when the failed data is system data, all the original data corresponding to the backup data are target data, and all the original data need to be deleted and restored according to the backup data. When the data with the fault is the data of a certain application, the data corresponding to the application in the backup data is preset target data, and the original data corresponding to the preset target data in the system is target data. In addition, when the user determines that the error or the abnormality of a certain part of data does not exist absolutely, the part of data can be reserved in a mode of presetting the target data by the device.
It can be understood that, in order to prevent the failure of data restoration caused by the failure of original data deletion, the system may be detected after the original data is deleted to determine whether the original data is completely deleted. If the deletion is complete, go to S13; if not, judging whether the deleting process has file deleting authority, if not, granting the file deleting authority to the deleting process and executing the deleting operation again; and if the data recovery system has the deletion authority, the data recovery system is shown to be in fault, and first early warning information is sent to a manager so that the manager can maintain the data in time.
S13: and restoring all the data of the system to be restored according to the backup data.
In specific implementation, when the data of the system to be restored is restored according to the backup data, the saving path of the file is determined according to the name space and the attribute information of the file in the backup data, and the file is created in the corresponding path.
It should be noted that it is also necessary to record whether the data is successfully restored. When data cannot be restored normally, the reason for restoration failure is first determined, and the failure reason generally includes: the file exists in the path, and the storage space under the path is insufficient. If the failure reason is that the file already exists, recording as successful restoration; otherwise, recording as failure, and sending second early warning information to the manager.
In a specific implementation, in order to prevent the multiple restoring processes from interfering with each other, only one restoring process can be allowed to operate at the same time by limiting one file through a distributed lock.
It can be understood that when the data restoring task is completed, information of the file restored in the restoring task at this time needs to be recorded in the restoring report, so as to provide data support for subsequent maintenance work on the system.
The embodiment provides a data reduction method, which comprises the following steps: acquiring a backup file and analyzing the backup file to acquire backup data so as to restore system data according to the backup data; and judging whether a first preset condition is met, if so, deleting the original data corresponding to the backup data, wherein the original data is the data in the system to be restored, so as to prevent the original data from being wrong or not matched with the restored data and influencing the normal work of the system. And restoring the data of the system to be restored according to the backup data so as to ensure that the system can work normally. Therefore, the data restoring method provided by the application can prevent the situation that the system cannot work normally due to the fact that the original data are wrong or the original data are not matched with the restored data by deleting the original data in the system when the preset condition is met.
In particular implementations, the causes of data corruption in computer systems are diverse, such as: data damage may be caused by external malicious attacks, program running errors, or data loss or damage caused by computer hardware damage. For data damage caused by different reasons, if a method of deleting target data and completely replying is adopted, waste of computing resources may be caused. Therefore, the target data is completely deleted and recreated only when the system to be restored satisfies the first preset condition. When the first preset condition is not met, it is indicated that no error occurs in the original data in the system to be restored, and only missing data in the system needs to be restored.
On the basis of the above embodiment, the first preset condition includes:
and detecting that the operation of deleting the target data triggered by the user and/or the state of the target data meet a second preset condition.
It is understood that the operation of the user triggering deletion of the target data includes clicking a delete button or inputting a delete command, and in a specific implementation, a selection page may be created in the system, and the user selects whether to delete the original data in the system to be restored. It should be noted that, in order to ensure the security of the system, a right may also be set for the user, and only the user with the corresponding right can execute the operation of deleting the original data.
In specific implementation, besides determining the reduction method according to user selection, which reduction method is adopted can be determined according to the state of the target data, for example, whether the target data in the system to be reduced has errors is detected through the check bits; or judging whether the target data is matched with the restored data according to the amount of the target data in the system to be restored or the time stamp in the data. And if the target data is wrong or the target data is not matched with the reduction data, the state of the target data meets a second preset condition, and at the moment, the target data in the system to be reduced is deleted and all data in the system are reduced.
In this embodiment, the detected deletion operation of the user and/or the detected second preset condition that the target data meets the second preset condition is used as the first preset condition, so as to ensure that the system can reduce the computing resources consumed by the system for restoring the data on the basis of successfully restoring the data.
In the specific implementation, the data that the user wants to restore may be data of the whole computer system, or data of a certain application in the system, and in addition, there may be some data that the user determines is error-free and does not need to restore. If the user cannot control the target data to be restored, the data of the whole system needs to be completely deleted and restored when the data of a single application is restored, which causes waste of computing resources.
To solve the technical problem, on the basis of the above embodiment, determining the target data according to the backup data includes:
judging whether preset target data exist in the backup data or not;
if yes, determining original data corresponding to preset target data as target data;
and if the backup data does not exist, determining all original data corresponding to the backup data as target data.
The preset target data is a part of the backup data, may be data preset by a user, or may be automatically determined by the system according to the data of the application to be restored, and is not limited herein. It should be noted that if the preset target data exists, the original data corresponding to the preset target data in the system is used as the target data; and if the target data does not exist, all the original data corresponding to the backup data in the system are used as the target data.
In this embodiment, by determining whether the preset target data exists in the backup data, the amount of the target data is further reduced, and the waste of computing resources in the data restoring process is prevented.
In the specific implementation, it needs to be ensured that the target data in the system to be restored is completely deleted, so as to prevent the restoration failure. Therefore, on the basis of the above embodiment, after the step of deleting the target data, the method further includes:
judging whether the target data is deleted or not;
if not, judging whether the process executing the deleting operation has the file deleting authority or not;
if the file does not have the deletion authority, the file deletion authority is granted to the process for executing the deletion operation;
and if the authority of deletion is available, first early warning information is sent to the manager.
And if the deletion is successful, executing the operation of restoring the data.
It can be understood that the reason for the failure of data deletion may be that the process executing the deletion operation does not have the deletion authority, and therefore, when the deletion fails, it should be first detected whether the process executing the deletion operation has the deletion authority, and if the process does not have the deletion authority, the deletion authority is granted and the deletion operation is executed again; if the system has the deletion authority, other problems exist in the system, such as: and if the process for executing the deleting operation has errors, sending first early warning information to the manager in time so that the manager can maintain the system in time.
In a specific implementation, the manner of sending the warning information may be to pop up a warning popup window in the system interface, or write a log file, and the like, which is not limited herein.
In the embodiment, whether the target data is successfully deleted is judged, so that the successful execution of the restoration operation is ensured, and the reliability of the system is improved.
In a specific implementation, the backup file may be stored in the local storage device, or may be stored in the remote server, and compared with the former method, the storage in the remote server can better ensure the security of the backup file, and is convenient for updating and maintaining. Therefore, in this embodiment, the backup file is selected to be acquired from the remote server.
On the basis of the above embodiment, acquiring the backup file includes:
judging whether a preset version of the backup file exists in a backup file library or not;
if yes, obtaining the backup file of the preset version;
and if the backup file does not exist, acquiring the backup file of the latest version.
In order to ensure the reliability of the backup file, the backup file needs to be frequently updated. In specific implementation, backup files are generated according to the original data of the system at preset time intervals and are stored in a file library of a remote server.
It will be appreciated that in order to further increase the diversity and reliability of the remote repository, the repository contains a plurality of computer system backup files that may be used alternatively.
In order to ensure that the acquired backup file can normally run on the current equipment, before the backup file is used for hilt equipment, the validity of the downloaded backup file needs to be checked, whether the backup file is complete is checked through a hash algorithm, the hash algorithm and a key are generally used for carrying out hash operation on file data to obtain a hash value of the file data when the backup file is checked, then the hash value and the data are sent to a remote server together, after the remote server receives the data, the hash operation is carried out on the data by using the same hash algorithm and key to obtain the hash value, and if the obtained hash value is the same as the received hash value, the file data is stated to be not tampered. The hash algorithm used in the network data integrity check generally includes MD5 algorithm and SHA algorithm.
Further, different devices have different hardware architectures, such as an X86 architecture, an X64 architecture, an ARM architecture, and the like, and different operating systems, such as a Windows system, a Linux system, and the like, and in order to ensure that the backup files can normally operate, it is also necessary to check whether the downloaded backup files are suitable for the current device.
In this embodiment, the reliability of the data recovery system is provided by defining the backup files to be used, preferentially using the backup files specified by the user or the latest version.
In specific implementation, data restoration is very important for normal operation of the system. If the data recovery fails, the pit can cause the operation of the system to have risks, and loss is caused. Therefore, it is necessary to determine whether data restoration is successful in time.
On the basis of the above embodiment, after the step of restoring the data of the system to be restored according to the backup data, the method further includes:
judging whether the reduction is successful;
if the data is unsuccessful, judging whether the failure reason is that the original data already exists;
and if not, sending second early warning information to the manager.
In a specific implementation, the reasons for the failure of the backup data restore include: insufficient computing resource quota, insufficient file storage space, existing original data and the like. And when the failure reason is that the original data already exists, indicating that other data recovery processes finish the operation and not needing to restore again. Otherwise, it indicates that the process executing the restore operation has an error, and needs to send early warning information to the manager in time for quick maintenance.
Furthermore, a distributed lock can be used for limiting the processes capable of simultaneously executing the restoration operation, so that the processes for executing the restoration operation are prevented from interfering with each other.
In this embodiment, whether data recovery is successful is detected, and when data recovery fails, whether a system needs to be maintained is determined according to a failure reason, so that the reliability of data recovery is further improved.
In specific implementation, in order to enable a manager to obtain a data reduction result and a working state of a system to be reduced so as to take corresponding operations on the system to be reduced, a reduction report needs to be generated.
On the basis of the above embodiment, after the step of restoring the data of the system to be restored according to the backup data, the method further includes:
and generating a restoration report to record the information of the restored data in the system to be restored.
It can be understood that recording the data reduction event may include recording information such as the number of times of data reduction of the current device, whether the data reduction is successful, and version information of the reduced data, and may also include different conditions occurring in the reduction process, for example: and if the data recovery fails, the reason that the data is not successfully recovered is recorded, so that management personnel can analyze and maintain the equipment conveniently.
It should be noted that after the data is restored and recorded into the log file, the log file may be saved in the local device, or may be saved in a remote server for storing the mirror image file library. Compared with the former scheme, the method for storing the log file in the remote server has the advantages of being convenient to check and not prone to losing data due to equipment failure.
In the embodiment, the reduction report is generated to record the information of the reduced data in the system to be reduced, so that the management personnel can know the working state of the equipment conveniently, and data support is provided for the subsequent development work.
In the foregoing embodiments, detailed descriptions are given to the data restoring method, and the present application also provides embodiments corresponding to the data restoring apparatus. It should be noted that the present application describes the embodiments of the apparatus portion from two perspectives, one from the perspective of the function module and the other from the perspective of the hardware.
Fig. 2 is a structural diagram of a data reduction apparatus according to an embodiment of the present application, where the apparatus includes:
the analysis module 10 is configured to obtain a backup file and analyze the backup file to obtain backup data;
the judging module 11 is configured to judge whether a current state of the system to be restored meets a first preset condition;
the deleting module 12 is configured to determine target data according to the backup data and delete the target data if the target data is satisfied, where the target data is original data in the system to be restored;
and the restoring module 13 is configured to restore all data of the system to be restored according to the backup data.
Since the embodiment of the apparatus portion and the embodiment of the method portion correspond to each other, please refer to the description of the embodiment of the method portion for the embodiment of the apparatus portion, and details are not repeated here.
The embodiment provides a data reduction device, which includes: acquiring a backup file and analyzing the backup file to acquire backup data so as to restore system data according to the backup data; and judging whether a first preset condition is met, if so, deleting the original data corresponding to the backup data, wherein the original data is the data in the system to be restored, so as to prevent the original data from being wrong or not matched with the restored data and influencing the normal work of the system. And restoring the data of the system to be restored according to the backup data so as to ensure that the system can work normally. Therefore, the data restoring device provided by the application deletes the original data in the system when the preset condition is met, and prevents the situation that the system cannot work normally due to the fact that the original data is wrong or the original data is not matched with the restored data.
Fig. 3 is a structural diagram of a data restoring apparatus according to another embodiment of the present application, and as shown in fig. 3, the data restoring apparatus includes: a memory 20 for storing a computer program;
the processor 21 is configured to implement the steps of the data restoring method according to the above embodiment when executing the computer program.
The computer device provided by the embodiment includes, but is not limited to, a smart phone, a tablet computer, a notebook computer, or a desktop computer.
The processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The Processor 21 may be implemented in hardware using at least one of a Digital Signal Processor (DSP), a Field-Programmable Gate Array (FPGA), and a Programmable Logic Array (PLA). The processor 21 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 21 may be integrated with a Graphics Processing Unit (GPU) which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, the processor 21 may further include an Artificial Intelligence (AI) processor for processing computational operations related to machine learning.
The memory 20 may include one or more computer-readable storage media, which may be non-transitory. Memory 20 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used for storing the following computer program 201, wherein after being loaded and executed by the processor 21, the computer program can implement the relevant steps of the data restoring method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202, data 203, and the like, and the storage manner may be a transient storage manner or a permanent storage manner. Operating system 202 may include, among others, Windows, Unix, Linux, and the like. Data 203 may include, but is not limited to, target data, and the like.
In some embodiments, the data recovery device may further include a display 22, an input/output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.
Those skilled in the art will appreciate that the configuration shown in fig. 3 does not constitute a limitation of the data reduction apparatus and may include more or fewer components than those shown.
The data recovery device provided by the embodiment of the application comprises a memory and a processor, wherein when the processor executes a program stored in the memory, the following method can be realized:
acquiring a backup file and analyzing the backup file to acquire backup data;
judging whether the current state of the system to be restored meets a first preset condition or not;
if yes, determining target data according to the backup data and deleting the target data, wherein the target data are original data in the system to be restored;
and restoring all the data of the system to be restored according to the backup data.
Finally, the application also provides a corresponding embodiment of the computer readable storage medium. The computer-readable storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps as set forth in the above-mentioned method embodiments.
It is to be understood that if the method in the above embodiments is implemented in the form of software functional units and sold or used as a stand-alone product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium and executes all or part of the steps of the methods described in the embodiments of the present application, or all or part of the technical solutions. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The data restoring method, device and medium provided by the present application are described in detail above. The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

Claims (10)

1. A method of data reduction, comprising:
acquiring a backup file and analyzing the backup file to acquire backup data;
judging whether the current state of the system to be restored meets a first preset condition or not;
if yes, determining target data according to the backup data and deleting the target data, wherein the target data are original data in the system to be restored;
and restoring all the data of the system to be restored according to the backup data.
2. The data reduction method according to claim 1, wherein the first preset condition comprises:
and detecting that the user triggers the operation of deleting the target data, and/or the state of the target data meets a second preset condition.
3. The data reduction method of claim 1, wherein the determining target data from the backup data comprises:
judging whether preset target data exist in the backup data or not;
if the target data exists, determining the original data corresponding to the preset target data as the target data;
and if the target data does not exist, determining all the original data corresponding to the backup data as the target data.
4. The data recovery method of claim 1, wherein after the step of deleting the target data, further comprising:
judging whether the target data is deleted or not;
if not, judging whether the process executing the deleting operation has the file deleting authority or not;
if the file deletion authority is not available, the file deletion authority is granted to the process executing the deletion operation;
if the file deletion authority exists, first early warning information is sent to a manager;
and if the backup data is deleted, the step of restoring all the data of the system to be restored according to the backup data is carried out.
5. The data recovery method according to any one of claims 1 to 4, wherein the obtaining the backup file comprises:
judging whether a backup file library has the backup file with a preset version or not;
if yes, obtaining the backup file of the preset version;
and if the backup file does not exist, acquiring the backup file of the latest version.
6. The data restoring method according to claim 4, wherein after the step of restoring all data of the system to be restored according to the backup data, the method further comprises:
judging whether the reduction is successful;
if the restoration is not successful, judging whether the failure reason is that the original data already exists;
and if the original data do not exist, sending second early warning information to the manager.
7. The data restoring method according to claim 1, wherein after the step of restoring all data of the system to be restored according to the backup data, the method further comprises:
and generating a restoration report to record the information of the restored data in the system to be restored.
8. A data recovery apparatus, comprising:
the analysis module is used for acquiring backup files and analyzing the backup files to acquire backup data;
the judging module is used for judging whether the current state of the system to be restored meets a first preset condition or not;
the deleting module is used for determining target data according to the backup data and deleting the target data if the backup data is met, wherein the target data is original data in the system to be restored;
and the restoring module is used for restoring all the data of the system to be restored according to the backup data.
9. A data recovery apparatus comprising a memory for storing a computer program;
a processor for implementing the steps of the data reduction method of any one of claims 1 to 7 when the computer program is executed.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the data reduction method according to any one of claims 1 to 7.
CN202210111500.7A 2022-01-29 2022-01-29 Data restoration method, device and medium Pending CN114443370A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210111500.7A CN114443370A (en) 2022-01-29 2022-01-29 Data restoration method, device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210111500.7A CN114443370A (en) 2022-01-29 2022-01-29 Data restoration method, device and medium

Publications (1)

Publication Number Publication Date
CN114443370A true CN114443370A (en) 2022-05-06

Family

ID=81371881

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210111500.7A Pending CN114443370A (en) 2022-01-29 2022-01-29 Data restoration method, device and medium

Country Status (1)

Country Link
CN (1) CN114443370A (en)

Similar Documents

Publication Publication Date Title
CN106951345B (en) Consistency test method and device for disk data of virtual machine
AU2021206497B2 (en) Method and apparatus for authority control, computer device and storage medium
JP2006031109A (en) Management system and management method
US20120296878A1 (en) File set consistency verification system, file set consistency verification method, and file set consistency verification program
US20190227710A1 (en) Incremental data restoration method and apparatus
CN109284331B (en) Certificate making information acquisition method based on service data resources, terminal equipment and medium
US7441153B1 (en) Method and system for secure and reliable event logging
CN114461341A (en) Method, device and medium for preventing brain crack of cloud platform virtual machine
US10936395B1 (en) Smart log parser for backup software to ease troubleshooting
JP2008210151A (en) Failure prediction system
CN116719657A (en) Firmware fault log generation method, device, server and readable medium
CN114443370A (en) Data restoration method, device and medium
CN111694724A (en) Testing method and device of distributed table system, electronic equipment and storage medium
CN112650613B (en) Error information processing method and device, electronic equipment and storage medium
KR102221593B1 (en) System for maintaining the installation envoronment of computer terminals
CN114153503A (en) BIOS control method, device and medium
CN113076122A (en) Resource file management method, device, equipment and storage medium
CN115329391B (en) Text database protection method, device, equipment and medium
JP7180319B2 (en) Information processing device and dump management method for information processing device
CN106293897B (en) Automatic scheduling system of subassembly
US11714631B2 (en) Method, electronic device, and computer program product for managing operating system
CN111625853B (en) Snapshot processing method, device and equipment and readable storage medium
CN112947948B (en) Deployment method and device of application service
CN117873408B (en) Cloud printer data recovery method and related device
CN113868023B (en) Snapshot method and device of storage system, electronic equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination