CN113094211A - Backup data processing method and device - Google Patents

Backup data processing method and device Download PDF

Info

Publication number
CN113094211A
CN113094211A CN202110440519.1A CN202110440519A CN113094211A CN 113094211 A CN113094211 A CN 113094211A CN 202110440519 A CN202110440519 A CN 202110440519A CN 113094211 A CN113094211 A CN 113094211A
Authority
CN
China
Prior art keywords
backup
data
version number
upgrading
application
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
CN202110440519.1A
Other languages
Chinese (zh)
Other versions
CN113094211B (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.)
Beijing Skyguard Network Security Technology Co ltd
Original Assignee
Beijing Skyguard Network Security 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 Beijing Skyguard Network Security Technology Co ltd filed Critical Beijing Skyguard Network Security Technology Co ltd
Priority to CN202110440519.1A priority Critical patent/CN113094211B/en
Publication of CN113094211A publication Critical patent/CN113094211A/en
Application granted granted Critical
Publication of CN113094211B publication Critical patent/CN113094211B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1435Saving, restoring, recovering or retrying at system level using file system or storage system metadata
    • 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/1458Management of the backup or restore process
    • G06F11/1469Backup restoration techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/174Redundancy elimination performed by the file system
    • G06F16/1744Redundancy elimination performed by the file system using compression, e.g. sparse files

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Quality & Reliability (AREA)
  • Human Computer Interaction (AREA)
  • Library & Information Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method and a device for processing backup data, and relates to the technical field of computers. One embodiment of the method comprises: in response to receiving a backup instruction, according to a preset backup strategy, backing up data to be backed up, and recording the current version number of the backup; determining and storing an upgrading strategy of a current version number in a preset upgrading module, wherein the upgrading strategy of the current version number is configured and packaged with a script or program for upgrading backup data corresponding to a previous version number of the current version number to the backup data of the current version number; when a data recovery request is received, target backup data related to an application included in the data recovery request is acquired; and judging whether the version number of the application is greater than the version number of the target backup data, if so, restoring the data for the application based on the upgrading strategy and the target backup data included by the upgrading module. This embodiment enables cross-version recovery of backup data.

Description

Backup data processing method and device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for processing backup data.
Background
During the use process of the application or system installed on the device, such as a terminal device, a server device, etc., the application or system can backup the configuration file of the application or system, the file, the data, etc. generated by the operation of the application or system can be used for recovering the application or system after the device is failed. As applications or systems are continuously upgraded during use, differences in data structures of backup files of different versions may occur. When the version of the application or system is different from the version of the backup file, the existence of such difference often results in a data recovery failure.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for processing backup data, which can implement cross-version recovery of the backup data.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a method of backup data processing, including:
in response to receiving a backup instruction, according to a preset backup strategy, backing up data to be backed up, and recording the current version number of the backup;
determining and storing an upgrading strategy of the current version number in a preset upgrading module, wherein the upgrading strategy of the current version number is configured and packaged with a script or program for upgrading backup data corresponding to a previous version number of the current version number to the backup data of the current version number;
when a data recovery request is received, target backup data related to an application included in the data recovery request is acquired;
and judging whether the version number of the application is greater than the version number of the target backup data, if so, restoring data for the application based on an upgrading strategy and the target backup data which are included by the upgrading module.
Optionally, the method for processing backup data further comprises:
providing a plurality of backup options, wherein each of the backup options corresponds to a backup type;
when a selection instruction of at least one target backup option in the plurality of backup options is received, a corresponding preset backup strategy is determined for a target backup type corresponding to the at least one target backup option.
Optionally, restoring data for the application based on the upgrade policy included in the upgrade module and the target backup data, includes:
the following steps N1 to N5 are performed:
n1: determining a next version number corresponding to the version number of the target backup data;
n2: upgrading the target backup data into data corresponding to the next version number according to an upgrading strategy corresponding to the next version number stored by the upgrading module;
n3: judging whether the next version number is consistent with the version number of the application, if so, executing the step N4; otherwise, go to step N5;
n4: determining that the data recovery is completed, and ending the cycle;
n5: and taking the data corresponding to the next version number as target backup data, resetting the version number of the target backup data, and executing the step N1.
Optionally, the backup type includes:
the database stores any one or more of information, files, folders, configuration information, and generation information.
Optionally, the backing up the data to be backed up includes:
backing up data related to the target backup type.
Optionally, the backing up the data to be backed up includes:
generating a backup folder for the current version number;
adding data to be backed up to the backup folder;
and compressing and encrypting the backup folder to obtain the backup file.
Optionally, adding the data to be backed up to the backup folder includes:
setting a storage directory for the backup folder;
and storing the data to be backed up and the basic information related to the data to be backed up into the storage directory.
Optionally, the method for processing backup data further comprises:
and adding a plurality of backup files into a preset backup list.
Optionally, the obtaining target backup data related to the application included in the data recovery request includes:
displaying a plurality of backup files through the backup list;
downloading a target backup file in the backup list upon receiving a trigger for the target backup file.
Alternatively,
and carrying out integrity check on the target backup data, and when the check is passed, executing the step of judging whether the version number of the application is greater than the version number of the target backup data.
Optionally, the method for processing backup data further comprises:
backing up the application included in the data recovery request;
and when the data recovery fails, recovering the application according to the backed-up application.
Optionally, the method for processing backup data further comprises:
and generating abnormal recovery prompt information when the version number of the application is greater than the version number of the target backup data.
In a second aspect, an embodiment of the present invention provides an apparatus for processing backup data, including: a data backup module, an upgrade module, and a backup recovery module, wherein,
the data backup module is used for responding to the received backup instruction, backing up the data to be backed up according to a preset backup strategy and recording the current version number of the backup;
the upgrading module is used for determining and storing the upgrading strategy of the current version number, wherein the upgrading strategy of the current version number is configured and packaged with a script or program for upgrading backup data corresponding to a previous version number of the current version number to the backup data of the current version number;
the backup recovery module is used for acquiring target backup data related to the application included in the data recovery request when the data recovery request is received; and judging whether the version number of the application is greater than the version number of the target backup data, if so, restoring data for the application based on an upgrading strategy and the target backup data which are included by the upgrading module.
One embodiment of the above invention has the following advantages or benefits: the upgrading strategy is configured and packaged with a script or program for upgrading the backup data corresponding to the previous version number of the current version number to the backup data of the current version number, namely, the script or program for upgrading the backup data of the low version number to the backup data of the high version number in two adjacent version numbers is stored in the upgrading module, so that in the subsequent data recovery process, the backup data of the low version number can be upgraded to the data corresponding to the high version number through the upgrading strategy stored in the upgrading module, namely, when the data recovery request is received, the target backup data related to the application included in the data recovery request is obtained; and judging whether the version number of the application is greater than the version number of the target backup data, if so, restoring the data for the application based on the upgrading strategy and the target backup data included by the upgrading module, thereby realizing the cross-version restoration of the data.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of an application scenario of backup data processing according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a main flow of a method of backup data processing according to an embodiment of the invention;
FIG. 3 is a schematic diagram of the main flow of data recovery according to an embodiment of the invention;
FIG. 4 is a schematic diagram of a main flow of data backup according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a main flow of a method of backup data processing according to another embodiment of the present invention;
FIG. 6 is a schematic diagram of the main modules of an apparatus for backup data processing according to an embodiment of the present invention;
FIG. 7 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 8 is a schematic structural diagram of a computer system suitable for implementing a terminal device or a server according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
An application scenario of the system for processing backup data provided by the embodiment of the present invention may be as shown in fig. 1. As shown in fig. 1, the system for processing backup data may include a plurality of devices and a storage device for storing backup files, where fig. 1 shows that 5 devices are device a101, device B102, device C103, device D104, and device E105, respectively, and a storage device 106, and the storage device may be a server that forms a database, a cloud storage device, or the like. Each device, such as device a101, device B102, device C103, device D104, and device E105, may back up data generated by itself, such as configuration information, files, folders, etc., to the storage device 106. Each device can download the backed-up data from the storage device 106 and restore the data corresponding to the current version number of the device based on the backed-up data; each device can also transmit the backup data to other devices, and the other devices perform data recovery according to the received backup data. For example, the device a101 transmits the backup data to the device B102, the device C103, the device D104, and the device E105, and the device B102, the device C103, the device D104, and the device E105 perform a step of performing data restoration based on the received backup data.
In the application scenario shown in fig. 1, to deal with the possible unexpected situations such as file loss or data damage, data information on a device is often backed up for recovery after a failure, but software installed in devices of the same model, such as device a101, device B102, device C103, device D104, and device E105, is continuously upgraded during use, so that the backed-up file during use may not be consistent with the version of the current software, and if it is limited that the backed-up information must be consistent with the version of the software, the use of backed-up data has a relatively large limitation. In order to solve the above problem, a recovery method of the backup data is proposed when the version of the backup data is inconsistent with the current version of the software.
In the scheme provided by the embodiment of the invention, in the process of backing up data by equipment, not only are configuration information and data of current software backed up, but also the related version number of the current software is recorded simultaneously, and a module for upgrading the software from a low version to a high version is arranged in the equipment or the software, so that when the version number of the backup data acquired or downloaded by the equipment is lower than the current version number of the software, the backup data can be upgraded and restored by the module for upgrading the low version to the high version.
Fig. 2 is a method for processing backup data according to an embodiment of the present invention, and as shown in fig. 2, the method for processing backup data may include the following steps:
step S201: in response to receiving a backup instruction, according to a preset backup strategy, backing up data to be backed up, and recording the current version number of the backup;
this step may be performed by the storage device 106 shown in fig. 1, or may be performed by each device shown in fig. 1, such as the device a101, the device B102, the device C103, the device D104, the device E105, and the like. Specifically, each device shown in fig. 1, such as the device a101, the device B102, the device C103, the device D104, the device E105, and the like, sends a backup instruction including data to be stored to the storage device 106, so that the storage device backs up the data to be stored, and records a current version number of backup, where the current version number is a version number of an application from which the data to be stored is derived. It may also be that each device shown in fig. 1, such as the device a101, the device B102, the device C103, the device D104, the device E105, and the like, performs backup on the data to be backed up in its own storage space when receiving a backup trigger (the backup trigger may be an automatic trigger after the data to be backed up occurs or a timing trigger, and the like).
Step S202: determining and storing an upgrading strategy of a current version number in a preset upgrading module, wherein the upgrading strategy of the current version number is configured and packaged with a script or program for upgrading backup data corresponding to a previous version number of the current version number to the backup data of the current version number;
the preset upgrading module can be directly used as a part of an application or a system, and an upgrading script or an upgrading program of the application or the system is stored and packaged in the preset upgrading module. It is worth mentioning that the upgrade script or upgrade program may upgrade the relevant data in the application in version order.
In this step, corresponding upgrading policies may be generated according to differences between adjacent versions of the application, for example, the configuration information in the backup data corresponding to the previous version number is a, b, and c, and the configuration information in the backup data corresponding to the current version number is a, d, and c, that is, if the configuration information b needs to be modified into the configuration information d when the backup data of the previous version number is upgraded to the backup data of the current version number, the upgrading policy of the current version number is a script or a program that modifies the configuration information b into the configuration information d.
It should be noted that, because the upgrade policy of the current version number configures and encapsulates the script or program for upgrading the backup data corresponding to the previous version number of the current version number to the backup data of the current version number, the upgrade policy stored in the upgrade module in this step can perform program upgrade on the backup data. For example, if the corresponding version number of the backup data f1 is 1.0, the currently applied version number is 5.0, and there are version number 2.0, version number 3.0, and version number 4.0 between version number 1.0 and version number 5.0, in the process of upgrading the backup data f1 to the backup data corresponding to version number 5.0, the backup data f1 is upgraded to the backup data f2 corresponding to version number 2.0 by using the upgrade policy corresponding to version number 2.0, then the backup data f2 is upgraded to the backup data f3 corresponding to version number 3.0 by using the upgrade policy corresponding to version number 4.0, then the backup data f3 is upgraded to the backup data f4 corresponding to version number 4.0 by using the upgrade policy corresponding to version number 3.0, and finally the backup data f4 is upgraded to the backup data f5 corresponding to version number 5.0 by using the upgrade policy corresponding to version number 5.0.
Step S203: when a data recovery request is received, target backup data related to an application included in the data recovery request is acquired;
the data recovery request may include the feature identifier of the application, and then the target backup data related to the application may be obtained according to the feature identifier of the application. The application may be an application installed in each device shown in fig. 1, such as device a101, device B102, device C103, device D104, device E105, for example, if the version of an application currently running in device E105 shown in fig. 1 is 5.0, if the factory setting needs to be restored due to a device reason, the application version of the application is reinstalled to be 5.0 after the factory setting is restored in device E105, and if the configuration information of the application needs to be restored to the factory setting, the target backup data related to the application may be acquired from another device, such as device a101 or storage device 106. The target backup data may be the backup data corresponding to the version number specified in the data recovery request, or may also be the backup data of the latest version stored by another device, such as the device a101 or the storage device 106. For example, if the version number specified in the data recovery request is 3.0, the backup data corresponding to the version number 3.0 is obtained. For another example, if the backup data of the latest version 6.0 stored in the device a101 or the storage device 106 is acquired, the backup data of the version 6.0 is acquired.
Step S204: judging whether the version number of the application is greater than the version number of the target backup data, if so, executing the step S205; otherwise, go to step S206;
for example, if the version number of the application is 5.0 and the version number of the target backup data is 3.0, the version number of the application is greater than the version number of the target backup data, and step S205 is executed; if the version number of the application is 5.0 and the version number of the target backup data is 5.0, the version number of the application is equal to the version number of the target backup data, and step S206 is executed; if the version number of the application is 6.0 and the version number of the target backup data is 5.0, the version number of the application is smaller than the version number of the target backup data, and step S206 is executed.
Step S205: restoring data for the application based on the upgrading strategy and the target backup data included by the upgrading module, and ending the current process;
for example, if the applied version number is 5.0 and the version number of the target backup data is 3.0, the target backup data is programmed to be upgraded according to the upgrade policy corresponding to the version number 4.0 and the upgrade policy corresponding to the version number 5.0 included in the upgrade module, specifically, the target backup data of the version number 3.0 is upgraded to the data of the version number 4.0 by using the upgrade policy corresponding to the version number 4.0 included in the upgrade module, and then the data of the version number 4.0 is upgraded to the data of the version number 5.0 by using the upgrade policy corresponding to the version number 5.0 included in the upgrade module, thereby implementing data recovery.
Step S206: prompt information is generated and provided.
In this step S206, for the case where the version number of the application is equal to the version number of the target backup data, the prompt information that does not need to be updated is generated and provided.
And generating and providing recovery exception information aiming at the situation that the version number of the application is smaller than that of the target backup data so as to prompt a user that recovery cannot be completed.
In the embodiment shown in fig. 2, since the preset upgrade module stores the upgrade policy corresponding to the current version number of the backup, the upgrade policy configures and encapsulates the script or program for upgrading the backup data corresponding to the previous version number of the current version number to the backup data of the current version number, that is, the script or program for upgrading the backup data of the low version number to the backup data of the high version number in two adjacent version numbers is stored in the upgrade module, in the subsequent data recovery process, the backup data of the low version number can be upgraded to the data corresponding to the high version number through the upgrade policy stored in the upgrade module, that is, when the data recovery request is received, the target backup data related to the application included in the data recovery request is acquired; and judging whether the version number of the application is greater than the version number of the target backup data, if so, restoring the data for the application based on the upgrading strategy and the target backup data included by the upgrading module, thereby realizing the cross-version restoration of the data.
In addition, the scheme provided by the embodiment of the invention can effectively reduce the workload of data backup and data recovery, namely, a standard backup file can be generated as a reference backup file, and the backup file can be directly taken to be recovered on a system or an application in the later system construction or application recovery.
In an embodiment of the present invention, the method for processing backup data may further include: providing a plurality of backup options, wherein each backup option corresponds to a backup type; when a selection instruction of at least one target backup option in the multiple backup options is received, a corresponding preset backup strategy is determined for a target backup type corresponding to the at least one target backup option.
Among them, the backup types may include: the database stores any one or more of information, files, folders, configuration information, and generation information.
For example, a plurality of backup options can be provided for the user through the display interface, for example, the backup options can be configuration information of the application, running information of the application, information generated by the application, files included by the application, folders included by the application, information stored in the database by the application, and the like. The user can select any one or more target backup options in the backup options, and the device or the application generates a corresponding selection instruction for the selected target backup option according to the selection of the user.
Each backup category is provided with a preset backup strategy, and after a target backup option is selected, a target backup type and the preset backup strategy corresponding to the target backup type can be determined so as to perform backup according to the preset backup strategy in the subsequent process. Specifically, the backing up the data to be backed up includes: data associated with the target backup type is backed up. For example, if the user selects to backup the configuration information of the application and the information generated by the application, only the configuration information of the application and the information generated by the application are backed up in the subsequent backup process.
The preset backup strategy may be a backup script or a backup program of the corresponding backup type data.
In an embodiment of the present invention, as shown in fig. 3, the specific implementation of step S205 may include the following steps:
step S301: determining a next version number corresponding to the version number of the target backup data;
for example, the version number of the target backup data is 3.0, the current version number of the application is 5.0, the next version number of the version number 3.0 is 4.0, and the next version number of the version number 4.0 is 5.0. Then in this step the next version number 4.0 of version number 3.0 needs to be determined first.
Step S302: upgrading the target backup data into data corresponding to the next version number according to an upgrading strategy corresponding to the next version number stored by the upgrading module;
for example, according to the upgrading policy corresponding to the version number 4.0, the target backup data is upgraded to the data corresponding to the version number 4.0.
Step S303: judging whether the next version number is consistent with the version number of the application, if so, executing the step S304; otherwise, step S305 is executed;
the next version number of this step refers to the next version number determined by step S301. For example, if the next version number is 4.0 and the current version number of the application is 5.0, if they are not the same, step S305 is executed; the next version number is 5.0, and the current version number of the application is 5.0, which is the same.
Step S304: determining that the data recovery is completed, and ending the cycle;
step S305: the data corresponding to the next version number is taken as the target backup data, and the version number of the target backup data is reset, and step S301 is executed.
For example, the data with the version number of 4.0 is used as the target backup data, and step S301 is executed to determine the next version number to be 5.0 for the version number of 4.0.
The backup data program is upgraded through the process, the data recovery flexibility is increased, the version of the backup data is not required to be consistent with the version of the current system, and the backup data can be only required to be lower than the version of the current system.
In an embodiment of the present invention, as shown in fig. 4, a specific implementation manner of backing up the data to be backed up in step S201 may include:
step S401: generating a backup folder for the current version number;
step S402: adding data to be backed up to a backup folder;
one embodiment of this step may include: setting a storage directory for the backup folder; and storing the data to be backed up and the basic information related to the data to be backed up in a storage directory.
Step S403: and compressing and encrypting the backup folder to obtain the backup file.
The backup data of the same version can be managed by the same backup folder, so that the backup data management is convenient, and meanwhile, the security of the backup data can be ensured by encrypting the backup folder.
In addition, the backup data is managed through the storage directory, and information in the backup data can be conveniently searched subsequently.
In an embodiment of the present invention, the method may further include: and adding a plurality of backup files into a preset backup list. The backup files are managed through the backup list, so that a user can conveniently check or select the backup files to be downloaded and the like.
In an embodiment of the present invention, one implementation manner of obtaining the target backup data related to the application included in the data recovery request may include: displaying a plurality of backup files through a backup list; and downloading the target backup file when receiving the trigger aiming at the target backup file in the backup list. Through the process, a user can conveniently select the required target backup file, and the flexibility of backup file selection is improved.
In an embodiment of the present invention, the method may further include: and carrying out integrity check on the target backup data, and when the check is passed, executing the step of judging whether the version number of the application is greater than the version number of the target backup data. The integrity check process may be decompressing and decrypting the backup file, and if successful, it indicates that the backup file is complete and usable, and if failed, it indicates that the backup data is incomplete. The success rate of subsequent data recovery can be effectively improved through the integrity check of the target backup data.
In an embodiment of the present invention, the method may further include: backing up the application included in the data recovery request; and when the data recovery fails, recovering the application according to the backed-up application. For example, the original data of the currently installed application version 5.0 in the device is backed up by the original data of the version 5.0, the configuration information of the currently installed application version 5.0 is restored by the backup data of the version 3.0, and if the restoration fails, the original data of the version 5.0 can be restored. The safety of data recovery is improved through the process, the backup file can be conveniently used for disaster recovery, the loss of data and configuration information is prevented, and meanwhile, a safer rollback mechanism is used for preventing the loss caused by recovery failure in the data recovery process.
Taking the architecture shown in fig. 5 and the flow of data backup and data recovery as examples, the process of backing up data and recovering data by each device will be described in detail.
Step S501: backing up data of the application in the device 1 to a storage area and a storage device of the device 1;
in this step, the data backup of the application may be triggered manually or set up to time trigger the backup function of the device. It is worth mentioning that a backup configuration file may be set in the device, and the type of data to be backed up, such as data stored in a database, files, folders, configuration information of an application, data generated by an application, and the like, may be configured in the backup configuration file. In addition, a corresponding backup policy (which may include a script or program for backing up data of the corresponding data type) may be set for each data type, so that the backup may be performed through the backup policy. In the backup process, the current version information of the application, such as version number, backup date, etc., needs to be correspondingly recorded. And obtaining a backup file by compressing and encrypting the backup data.
Step S502: displaying the backup file obtained by backup in a backup list;
the download link given by the backup list may be downloaded from a memory area of the device 1 or from a memory device. In the following, different ways of obtaining backup files will be described respectively by taking as examples that the device 2 downloads the backup files through the device list, the device 3 obtains the backup files through the storage device, and the device 4 directly receives the backup files transmitted by the device 1. Further, the device 2, the device 3, and the device 4 respectively obtain backup files of different versions, for example, taking the version numbers of the applications of the device 2, the device 3, and the device 4 as 5.0, the version number of the backup file obtained by the device 2 as 3.0, the version number of the backup file obtained by the device 3 as 5.0, and the version number of the backup file obtained by the device 4 as 6.0, the steps of the backup files of different versions in the data recovery process will be described.
Step S503: the device 2 acquires the backup list, receives a download trigger of the user to the backup file in the backup list, and executes step S506;
the device 2 may retrieve the backup list from the storage device or may retrieve the backup list from the device 1.
Step S504: the device 3 acquires the backup file from the storage device, and executes step S506;
step S505: the device 4 receives the backup file transmitted by the device 1 and executes step S506;
step S506: decompressing and decrypting the backup file, checking whether the backup file is complete, if so, executing step S507 for the device 2 and the device 3 respectively, and executing step S512 for the device 4; otherwise, prompting that the data recovery fails;
step S507: backing up the current application, and if the backup is successful, executing step S508 for the device 2; step S510 is performed for device 3; if the backup fails, giving a prompt message of the failure of the application backup;
by the steps, the application can be conveniently restored by using the backup result of the application after the subsequent data restoration fails, and the application rollback is realized.
Step S508: the device 2 upgrades the backup data with the version number of 3.0 into the data with the version number of 4.0 by using the upgrading strategy in the upgrading module of the device;
step S509: the version number 4.0 is smaller than the version number 5.0 applied in the device 2, the upgrading strategy in the upgrading module is continuously called, the data with the version number 4.0 is upgraded into the data with the version number of 5.0, and the step S511 is executed;
step S510: the device 3 directly configures the application with the backup data with the version number of 5.0;
step S511: restarting the equipment to load the recovered configuration and ending the current flow;
step S512: and prompting that the backup data version is too high and the recovery fails.
As shown in fig. 6, an embodiment of the present invention provides an apparatus 600 for processing backup data, where the apparatus 600 for processing backup data may include: a data backup module 601, an upgrade module 602, and a backup recovery module 603, wherein,
the data backup module 601, in response to receiving the backup instruction, is configured to backup the data to be backed up according to a preset backup policy, and record a current version number of the backup;
the upgrading module 602 is configured to determine and store an upgrading policy of a current version number, where the upgrading policy of the current version number configures and encapsulates a script or a program for upgrading backup data corresponding to a previous version number of the current version number to the backup data of the current version number;
a backup recovery module 603, configured to, when receiving a data recovery request, obtain target backup data related to an application included in the data recovery request; and judging whether the version number of the application is greater than the version number of the target backup data, if so, restoring the data for the application based on the upgrading strategy and the target backup data included by the upgrading module.
In the embodiment of the present invention, the data backup module 601 is further configured to provide a plurality of backup options, where each backup option corresponds to a backup type; when a selection instruction of at least one target backup option in the multiple backup options is received, a corresponding preset backup strategy is determined for a target backup type corresponding to the at least one target backup option.
In this embodiment of the present invention, the backup recovery module 603 is further configured to execute the following steps N1 to N5:
n1: determining a next version number corresponding to the version number of the target backup data;
n2: upgrading the target backup data into data corresponding to the next version number according to an upgrading strategy corresponding to the next version number stored by the upgrading module;
n3: judging whether the next version number is consistent with the version number of the application, if so, executing the step N4; otherwise, go to step N5;
n4: determining that the data recovery is completed, and ending the cycle;
n5: and taking the data corresponding to the next version number as target backup data, resetting the version number of the target backup data, and executing the step N1.
In this embodiment of the present invention, the backup types managed by the data backup module 601 may include: the database stores any one or more of information, files, folders, configuration information, and generation information.
In an embodiment of the present invention, the data backup module 601 is further configured to backup data related to the target backup type.
In the embodiment of the present invention, the data backup module 601 is further configured to generate a backup folder for the current version number; adding data to be backed up to a backup folder; and compressing and encrypting the backup folder to obtain the backup file.
In this embodiment of the present invention, the data backup module 601 is further configured to set a storage directory for the backup folder; and storing the data to be backed up and the basic information related to the data to be backed up in a storage directory.
In this embodiment of the present invention, the data backup module 601 is further configured to add a plurality of backup files to a preset backup list.
In this embodiment of the present invention, the backup recovery module 603 is further configured to display a plurality of backup files through a backup list; and downloading the target backup file when receiving the trigger aiming at the target backup file in the backup list.
In this embodiment of the present invention, the backup recovery module 603 is further configured to perform integrity check on the target backup data, and when the check is passed, execute a step of determining whether the version number of the application is greater than the version number of the target backup data.
In this embodiment of the present invention, the backup recovery module 603 is further configured to backup an application included in the data recovery request; and when the data recovery fails, recovering the application according to the backed-up application.
In this embodiment of the present invention, the backup recovery module 603 is further configured to generate a prompt message for recovering the exception, where the applied version number is greater than the version number of the target backup data.
Fig. 7 shows an exemplary system architecture 700 of a method of backup data processing or an apparatus of backup data processing to which embodiments of the present invention may be applied.
As shown in fig. 7, the system architecture 700 may include terminal devices 701, 702, 703, a network 704, a server 705, and a database 706. Network 704 is a medium used to provide communications links between terminal devices 701, 702, 703, between terminal devices 701, 702, 703 and server 705, between terminal devices 701, 702, 703 and databases, or between multiple servers 705. Network 704 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The terminal devices 701, 702, and 703 interact with the server 705 or the database 706 through the network 704 to receive or send messages, etc., for example, the terminal devices 701, 702, and 703 send the backup data to the server 705 or the database 706 for storage, and the terminal devices 701, 702, and 703 acquire the backup data from the server 705 or the database 706.
The terminal devices 701, 702, and 703 interact with each other through the network 704, for example, the terminal device 701 sends the backed-up data to the terminal devices 702 and 703, and the like.
The terminal devices 701, 702, 703 may have installed thereon various communication client applications, such as a shopping-like application, a web browser application, a search-like application, an instant messaging tool, a mailbox client, social platform software, etc. (by way of example only).
The terminal devices 701, 702, 703 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 705 may be a server providing various services, such as a background management server (for example only) providing support for backup data requested to be obtained by the terminal devices 701, 702, 703. The background management server may analyze and perform other processing on the received data such as the backup data acquisition request, and feed back a processing result (for example, the backup data — just an example) to the terminal device.
The server 705 interacts with the database 706 via the network 704 to receive or send messages, etc., for example, the server 705 sends the backup data to the database 706 for storage, and the server 705 retrieves the backup data from the database 706.
The database 706 may be a device providing storage service, such as a background management server (for example only) providing support for backup data requested to be obtained by the terminal devices 701, 702, 703 or the server 705. The background management server may analyze and perform other processing on the received data such as the backup data acquisition request, and feed back a processing result (for example, the backup data — just an example) to the terminal device.
It should be noted that the method for processing backup data provided in the embodiment of the present invention is generally executed by the terminal devices 701, 702, and 703 or the server 705, and accordingly, the apparatus for processing backup data is generally disposed in the terminal devices 701, 702, and 703 or the server 705.
It should be understood that the number of terminal devices, networks, servers, and databases in fig. 7 is merely illustrative. There may be any number of terminal devices, networks, servers, and databases, as desired for implementation.
Referring now to FIG. 8, shown is a block diagram of a computer system 800 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 8 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 8, the computer system 800 includes a Central Processing Unit (CPU)801 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data necessary for the operation of the system 800 are also stored. The CPU 801, ROM 802, and RAM 803 are connected to each other via a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
The following components are connected to the I/O interface 805: an input portion 806 including a keyboard, a mouse, and the like; an output section 807 including a signal such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 808 including a hard disk and the like; and a communication section 809 including a network interface card such as a LAN card, a modem, or the like. The communication section 809 performs communication processing via a network such as the internet. A drive 810 is also connected to the I/O interface 805 as necessary. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as necessary, so that a computer program read out therefrom is mounted on the storage section 808 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 809 and/or installed from the removable medium 811. The computer program executes the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 801.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes a data backup module, an upgrade module, and a backup recovery module. The names of the modules do not limit the modules themselves under certain conditions, for example, the data backup module may also be described as a "unit for backing up data to be backed up according to a preset backup policy".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: in response to receiving a backup instruction, according to a preset backup strategy, backing up data to be backed up, and recording the current version number of the backup; determining and storing an upgrading strategy of a current version number in a preset upgrading module, wherein the upgrading strategy of the current version number is configured and packaged with a script or program for upgrading backup data corresponding to a previous version number of the current version number to the backup data of the current version number; when a data recovery request is received, target backup data related to an application included in the data recovery request is acquired; and judging whether the version number of the application is greater than the version number of the target backup data, if so, restoring the data for the application based on the upgrading strategy and the target backup data included by the upgrading module.
According to the technical scheme of the embodiment of the invention, since the upgrading strategy corresponding to the current version number of the backup is stored in the preset upgrading module, the upgrading strategy is configured and packaged with the script or program for upgrading the backup data corresponding to the previous version number of the current version number to the backup data of the current version number, namely, the script or program for upgrading the backup data of the low version number to the backup data of the high version number is stored in the upgrading module in two adjacent version numbers, in the subsequent data recovery process, the backup data of the low version number can be upgraded to the data corresponding to the high version number through the upgrading strategy stored in the upgrading module, namely, when the data recovery request is received, the target backup data related to the application included in the data recovery request is obtained; and judging whether the version number of the application is greater than the version number of the target backup data, if so, restoring the data for the application based on the upgrading strategy and the target backup data included by the upgrading module, thereby realizing the cross-version restoration of the data.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (15)

1. A method of backup data processing, comprising:
in response to receiving a backup instruction, according to a preset backup strategy, backing up data to be backed up, and recording the current version number of the backup;
determining and storing an upgrading strategy of the current version number in a preset upgrading module, wherein the upgrading strategy of the current version number is configured and packaged with a script or program for upgrading backup data corresponding to a previous version number of the current version number to the backup data of the current version number;
when a data recovery request is received, target backup data related to an application included in the data recovery request is acquired;
and judging whether the version number of the application is greater than the version number of the target backup data, if so, restoring data for the application based on an upgrading strategy and the target backup data which are included by the upgrading module.
2. The method of claim 1, further comprising:
providing a plurality of backup options, wherein each of the backup options corresponds to a backup type;
when a selection instruction of at least one target backup option in the plurality of backup options is received, a corresponding preset backup strategy is determined for a target backup type corresponding to the at least one target backup option.
3. The method of claim 1, wherein restoring data for the application based on the upgrade policy included by the upgrade module and the target backup data comprises:
the following steps N1 to N5 are performed:
n1: determining a next version number corresponding to the version number of the target backup data;
n2: upgrading the target backup data into data corresponding to the next version number according to an upgrading strategy corresponding to the next version number stored by the upgrading module;
n3: judging whether the next version number is consistent with the version number of the application, if so, executing the step N4; otherwise, go to step N5;
n4: determining that the data recovery is completed, and ending the cycle;
n5: and taking the data corresponding to the next version number as target backup data, resetting the version number of the target backup data, and executing the step N1.
4. The method of claim 2, wherein the backup type comprises:
the database stores any one or more of information, files, folders, configuration information, and generation information.
5. The method of claim 2, wherein backing up the data to be backed up comprises:
backing up data related to the target backup type.
6. The method of claim 1, wherein backing up the data to be backed up comprises:
generating a backup folder for the current version number;
adding data to be backed up to the backup folder;
and compressing and encrypting the backup folder to obtain the backup file.
7. The method of claim 6, wherein adding data to be backed up to the backup folder comprises:
setting a storage directory for the backup folder;
and storing the data to be backed up and the basic information related to the data to be backed up into the storage directory.
8. The method of claim 6, further comprising:
and adding a plurality of backup files into a preset backup list.
9. The method of claim 8, wherein obtaining the target backup data associated with the application included in the data restore request comprises:
displaying a plurality of backup files through the backup list;
downloading a target backup file in the backup list upon receiving a trigger for the target backup file.
10. The method of claim 1, further comprising:
and carrying out integrity check on the target backup data, and when the check is passed, executing the step of judging whether the version number of the application is greater than the version number of the target backup data.
11. The method of claim 1, further comprising:
backing up the application included in the data recovery request;
and when the data recovery fails, recovering the application according to the backed-up application.
12. The method of claim 1, further comprising:
and generating abnormal recovery prompt information when the version number of the application is greater than the version number of the target backup data.
13. An apparatus for backup data processing, comprising: a data backup module, an upgrade module, and a backup recovery module, wherein,
the data backup module is used for responding to the received backup instruction, backing up the data to be backed up according to a preset backup strategy and recording the current version number of the backup;
the upgrading module is used for determining and storing the upgrading strategy of the current version number, wherein the upgrading strategy of the current version number is configured and packaged with a script or program for upgrading backup data corresponding to a previous version number of the current version number to the backup data of the current version number;
the backup recovery module is used for acquiring target backup data related to the application included in the data recovery request when the data recovery request is received; and judging whether the version number of the application is greater than the version number of the target backup data, if so, restoring data for the application based on an upgrading strategy and the target backup data which are included by the upgrading module.
14. A backup data processing electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-12.
15. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-12.
CN202110440519.1A 2021-04-23 2021-04-23 Backup data processing method and device Active CN113094211B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110440519.1A CN113094211B (en) 2021-04-23 2021-04-23 Backup data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110440519.1A CN113094211B (en) 2021-04-23 2021-04-23 Backup data processing method and device

Publications (2)

Publication Number Publication Date
CN113094211A true CN113094211A (en) 2021-07-09
CN113094211B CN113094211B (en) 2024-04-23

Family

ID=76679719

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110440519.1A Active CN113094211B (en) 2021-04-23 2021-04-23 Backup data processing method and device

Country Status (1)

Country Link
CN (1) CN113094211B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100274765A1 (en) * 2009-04-24 2010-10-28 Microsoft Corporation Distributed backup and versioning
CN102841793A (en) * 2011-06-23 2012-12-26 中兴通讯股份有限公司 Software upgrading method and terminal
CN105786641A (en) * 2014-12-17 2016-07-20 北京数码视讯科技股份有限公司 Method, equipment and intelligent card for back-upping and recovery of intelligent card application data
CN106021023A (en) * 2016-05-20 2016-10-12 北京奇虎科技有限公司 Application recovery method and device, and terminal
CN107179909A (en) * 2017-05-16 2017-09-19 广东美的暖通设备有限公司 Method for upgrading software, device and computer-readable recording medium
US20190095193A1 (en) * 2017-09-26 2019-03-28 C-Sky Microsystems Co., Ltd. System version upgrading method and apparatus
CN112099845A (en) * 2020-09-21 2020-12-18 华人运通(上海)云计算科技有限公司 Software version updating method, server, vehicle, and computer storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100274765A1 (en) * 2009-04-24 2010-10-28 Microsoft Corporation Distributed backup and versioning
CN102841793A (en) * 2011-06-23 2012-12-26 中兴通讯股份有限公司 Software upgrading method and terminal
CN105786641A (en) * 2014-12-17 2016-07-20 北京数码视讯科技股份有限公司 Method, equipment and intelligent card for back-upping and recovery of intelligent card application data
CN106021023A (en) * 2016-05-20 2016-10-12 北京奇虎科技有限公司 Application recovery method and device, and terminal
CN107179909A (en) * 2017-05-16 2017-09-19 广东美的暖通设备有限公司 Method for upgrading software, device and computer-readable recording medium
US20190095193A1 (en) * 2017-09-26 2019-03-28 C-Sky Microsystems Co., Ltd. System version upgrading method and apparatus
CN112099845A (en) * 2020-09-21 2020-12-18 华人运通(上海)云计算科技有限公司 Software version updating method, server, vehicle, and computer storage medium

Also Published As

Publication number Publication date
CN113094211B (en) 2024-04-23

Similar Documents

Publication Publication Date Title
CN109120678B (en) Method and apparatus for service hosting of distributed storage system
US11829263B2 (en) In-place cloud instance restore
CN107741852B (en) Service deployment method based on cluster software
CN109144785B (en) Method and apparatus for backing up data
CN110225078B (en) Application service updating method, system and terminal equipment
CN109391673A (en) A kind of method, system and the terminal device of management update file
CN107644075B (en) Method and device for collecting page information
CN108874825B (en) Abnormal data verification method and device
CN111666134A (en) Method and system for scheduling distributed tasks
CN110908681A (en) Method and device for upgrading software
CN111338834B (en) Data storage method and device
CN114064438A (en) Database fault processing method and device
CN110620798A (en) Control method, system, equipment and storage medium for FTP connection
CN112130889A (en) Resource management method and device, storage medium and electronic device
CN113094211B (en) Backup data processing method and device
CN112445860A (en) Method and device for processing distributed transaction
CN112084254A (en) Data synchronization method and system
CN114265605A (en) Version rollback method and device for functional component of business system
CN112241332B (en) Interface compensation method and device
CN110445628B (en) NGINX-based server and deployment and monitoring methods and devices thereof
CN112463616A (en) Chaos testing method and device for Kubernetes container platform
CN113296829A (en) Method, device, equipment and computer readable medium for processing service
CN111596933A (en) File processing method and device, electronic equipment and computer readable storage medium
CN111818179A (en) User request processing method and device, computing equipment and medium
CN112579247A (en) Method and device for determining task state

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
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Gao Lipeng

Inventor after: Liu Lin

Inventor after: Zhou Yongjian

Inventor after: Hou Junfeng

Inventor before: Gao Lipeng

Inventor before: Zhou Yongjian

Inventor before: Hou Junfeng

GR01 Patent grant
GR01 Patent grant