A data backup and recovery method, device, equipment and medium
Patent Information
- Application Number
- CN202211048634.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-30
- Publication Date
- 2026-09-25
- Estimated Expiration
- 2042-08-30
AI Technical Summary
现有技术方案大多聚焦于分布式存储多节点数据的一致性,导致数据备份恢复的效率较低
[0033]可见,本申请提出一种数据备份与恢复方法,包括:获取用户终端自定义的待备份数据的特征信息,并基于所述特征信息对相应的待备份数据进行本地备份;基于预设的异地备份策略从若干个异地存储中确定出目标异地存储,并在所述目标异地存储中对所述待备份数据进行备份,然后在其他异地存储中完成所述待备份数据的同步;当检测到用户终端针对待恢复数据的数据恢复请求,则判断本地数据中是否存在所述待恢复数据,如果是,则基于所述本地数据进行相应的数据恢复,如果否,则基于所述预设的异地备份策略从若干个异地存储中确定出新的目标异地存储,并利用所述新的目标异地存储进行相应的数据恢复。由此可见,本申请在备份数据时,在本地和异地存储均进行备份,保证了数据的稳定备份;在恢复数据时,首先基于本地数据进行恢复,若本地不存在,则基于预设的异地备份策略选择目标异地存储进行数据恢复,由此保证了数据的快速恢复。
Smart Images

Figure CN115586987B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a data backup and recovery method, apparatus, device, and medium. Background Technology
[0002] In the era of cloud computing, data corruption or loss can occur due to instability in equipment and network environments, as well as improper user operations, potentially leading to system crashes. Therefore, stable data backup and rapid recovery are crucial for ensuring system stability. Existing technologies mostly focus on the consistency of data across multiple nodes in distributed storage, resulting in relatively low efficiency in data backup and recovery.
[0003] Therefore, how to achieve stable data backup and rapid recovery is an urgent problem to be solved in this field. Summary of the Invention
[0004] In view of this, the purpose of this invention is to provide a data backup and recovery method, apparatus, device, and medium, which can achieve stable data backup and rapid recovery. The specific solution is as follows:
[0005] In a first aspect, this application discloses a data backup and recovery method, including:
[0006] Obtain the feature information of the user terminal's customized data to be backed up, and perform local backup of the corresponding data based on the feature information;
[0007] Based on a preset off-site backup strategy, a target off-site storage is determined from several off-site storages, and the data to be backed up is backed up in the target off-site storage. Then, the data to be backed up is synchronized in other off-site storages.
[0008] When a user terminal is detected to request data recovery for data to be recovered, it is determined whether the data to be recovered exists in the local data. If it does, the corresponding data recovery is performed based on the local data. If not, a new target off-site storage is determined from several off-site storages based on the preset off-site backup strategy, and the corresponding data recovery is performed using the new target off-site storage.
[0009] Optionally, obtaining the characteristic information of the user terminal's customized data to be backed up, and performing local backup of the corresponding data based on the characteristic information, includes:
[0010] Obtain the type and range of data to be backed up as defined by the user terminal, and perform local backup of the corresponding data based on the type and range.
[0011] Optionally, after obtaining the feature information of the user terminal's customized data to be backed up, the method further includes:
[0012] Determine the backup method, wherein the backup method includes single backup or scheduled periodic backup;
[0013] Accordingly, the step of performing local backup of the corresponding data to be backed up based on the feature information includes:
[0014] Based on the backup method and the feature information, the corresponding data to be backed up is backed up locally.
[0015] Optionally, the step of performing local backup of the corresponding data to be backed up based on the feature information includes:
[0016] Based on the aforementioned feature information, the corresponding data to be backed up is backed up locally, and an effective backup time is set.
[0017] Optionally, the data backup and recovery also includes:
[0018] Clean up the data on the local machine based on the effective backup time.
[0019] Optionally, after performing local backup of the corresponding data to be backed up based on the feature information, the method further includes:
[0020] Determine if the local backup was successful;
[0021] If the local backup is successful, then the step of determining the target off-site storage from several off-site storages based on the preset off-site backup strategy is executed.
[0022] If local backup fails, report the error reason.
[0023] Optionally, the determination of the target off-site storage from several off-site storages based on a preset off-site backup strategy includes:
[0024] Based on the target data recovery influencing factors specified in the preset off-site backup strategy, the weight scores of the plurality of off-site storages are calculated, and the target off-site storage is determined from the plurality of off-site storages according to the score results.
[0025] Secondly, this application discloses a data backup and recovery device, comprising:
[0026] The local backup module is used to obtain the feature information of the data to be backed up by the user terminal and perform local backup of the corresponding data based on the feature information.
[0027] The off-site backup module is used to determine the target off-site storage from several off-site storages based on a preset off-site backup strategy, back up the data to be backed up in the target off-site storage, and then complete the synchronization of the data to be backed up in other off-site storages.
[0028] The data recovery module is used to determine whether the data to be recovered exists in the local data when a data recovery request for data to be recovered is detected from a user terminal. If it does, the module performs corresponding data recovery based on the local data. If not, the module determines a new target off-site storage from several off-site storages based on the preset off-site backup strategy and performs corresponding data recovery using the new target off-site storage.
[0029] Thirdly, this application discloses an electronic device, including:
[0030] Memory, used to store computer programs;
[0031] A processor is used to execute the computer program to implement the aforementioned disclosed data backup and recovery method.
[0032] Fourthly, this application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned disclosed data backup and recovery method.
[0033] As can be seen, this application proposes a data backup and recovery method, including: obtaining characteristic information of data to be backed up by a user terminal, and performing local backup of the corresponding data based on the characteristic information; determining a target off-site storage from several off-site storages based on a preset off-site backup strategy, and backing up the data to be backed up in the target off-site storage, and then synchronizing the data to be backed up in other off-site storages; when a data recovery request for data to be recovered is detected from a user terminal, determining whether the data to be recovered exists in the local data, and if so, performing corresponding data recovery based on the local data; if not, determining a new target off-site storage from several off-site storages based on the preset off-site backup strategy, and performing corresponding data recovery using the new target off-site storage. Therefore, this application performs backups both locally and off-site, ensuring stable data backup; when recovering data, it first performs recovery based on the local data, and if the data does not exist locally, it selects a target off-site storage for data recovery based on the preset off-site backup strategy, thereby ensuring rapid data recovery. Attached Figure Description
[0034] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0035] Figure 1 This is a flowchart of a data backup and recovery method disclosed in this application;
[0036] Figure 2 This is a flowchart of a specific data backup and recovery method disclosed in this application;
[0037] Figure 3 This application discloses a specific data backup method flowchart;
[0038] Figure 4 This application discloses a specific data recovery method flowchart;
[0039] Figure 5 This is a schematic diagram of the structure of a data backup and recovery device disclosed in this application;
[0040] Figure 6 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation
[0041] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0042] In the era of cloud computing, data corruption or loss can occur due to instability in equipment and network environments, as well as improper user operations, potentially leading to system crashes. Therefore, stable data backup and rapid recovery are crucial for ensuring system stability. Existing technologies mostly focus on the consistency of data across multiple nodes in distributed storage, resulting in relatively low efficiency in data backup and recovery.
[0043] Therefore, this application proposes a data backup and recovery scheme that can achieve stable data backup and rapid recovery.
[0044] This application discloses a data backup and recovery method. See also Figure 1 As shown, the method includes:
[0045] Step S11: Obtain the feature information of the user terminal's customized data to be backed up, and perform local backup of the corresponding data to be backed up based on the feature information.
[0046] It should be noted that this embodiment can obtain the characteristic information of the user terminal's customized data to be backed up, and perform local backup of the corresponding data based on the characteristic information. In this way, backing up data according to the customized characteristic information can solve the problem of large data volume, improve backup speed, and save storage space.
[0047] In this embodiment, the backup method is first determined, wherein the backup method includes a single backup or a scheduled periodic backup; correspondingly, the local backup of the corresponding data to be backed up based on the feature information includes: performing a local backup of the corresponding data to be backed up based on the backup method and the feature information. In one specific implementation, a local single backup of the corresponding data to be backed up is performed based on the feature information; in another specific implementation, a local scheduled periodic backup of the corresponding data to be backed up is performed based on the feature information. In this way, this embodiment can select the backup method to adapt to actual business needs.
[0048] It should be noted that the local backup of the corresponding data to be backed up based on the feature information may specifically include: performing local backup of the corresponding data to be backed up based on the feature information and setting an effective backup time. In this way, this application can clean up the data in the local machine according to the effective backup time, saving disk space.
[0049] Step S12: Based on a preset off-site backup strategy, determine the target off-site storage from several off-site storages, back up the data to be backed up in the target off-site storage, and then complete the synchronization of the data to be backed up in other off-site storages.
[0050] In this embodiment, based on the target data recovery influencing factors specified in the preset off-site backup strategy, the weight scores of the plurality of off-site storages are calculated, and the target off-site storage is determined from the plurality of off-site storages according to the score results. The target data recovery influencing factors include, but are not limited to, factors affecting data recovery such as network and region. It can be understood that by calculating the weight scores of the plurality of off-site storages through the above-mentioned factors affecting data recovery, and determining the target off-site storage from the plurality of off-site storages according to the score results, this embodiment enables data to be uploaded to the target off-site storage at a faster speed.
[0051] Step S13: When a user terminal is detected to request data recovery for the data to be recovered, it is determined whether the data to be recovered exists in the local data. If it does, the corresponding data recovery is performed based on the local data. If not, a new target off-site storage is determined from several off-site storages based on the preset off-site backup strategy, and the corresponding data recovery is performed using the new target off-site storage.
[0052] In this embodiment, when a user terminal's data recovery request for data to be recovered is detected, it is determined whether the data to be recovered exists in the local data. If the data to be recovered exists in the local data, corresponding data recovery is performed based on the local data. If the data to be recovered does not exist in the local data, a new target off-site storage is determined from several off-site storages based on the preset off-site backup strategy, and corresponding data recovery is performed using the new target off-site storage. For example, since the local server has limited capacity, an effective backup time is set, and data outside the effective backup time is cleaned up to save disk space. Suppose the effective backup time for local data is 3 months, but the user terminal wants to obtain 1 year's worth of backup data. In this case, the backup data does not exist locally, so a new target off-site storage needs to be determined from several off-site storages based on the preset off-site backup strategy, and corresponding data recovery is performed using the data in the new target off-site storage.
[0053] As can be seen, this application proposes a data backup and recovery method, including: obtaining characteristic information of data to be backed up by a user terminal, and performing local backup of the corresponding data based on the characteristic information; determining a target off-site storage from several off-site storages based on a preset off-site backup strategy, and backing up the data to be backed up in the target off-site storage, and then synchronizing the data to be backed up in other off-site storages; when a data recovery request for data to be recovered is detected from a user terminal, determining whether the data to be recovered exists in the local data, and if so, performing corresponding data recovery based on the local data; if not, determining a new target off-site storage from several off-site storages based on the preset off-site backup strategy, and performing corresponding data recovery using the new target off-site storage. Therefore, this application performs backups both locally and off-site, ensuring stable data backup; when recovering data, it first performs recovery based on the local data, and if the data does not exist locally, it selects a target off-site storage for data recovery based on the preset off-site backup strategy, thereby ensuring rapid data recovery.
[0054] This application discloses a specific data backup and recovery method. Compared with the previous embodiment, this embodiment further explains and optimizes the technical solution. See also... Figure 2As shown, it specifically includes:
[0055] Step S21: Obtain the type and range of data to be backed up as defined by the user terminal, and perform local backup of the corresponding data based on the type and range.
[0056] It should be noted that this embodiment can obtain the type and range of data to be backed up as defined by the user terminal, and perform local backup of the corresponding data based on the type and range. In this way, backing up data according to the customized data type and range can solve the problem of large data volume, improve backup speed, and save storage space.
[0057] Step S22: Determine whether the local backup was successful; if the local backup was successful, execute the step of determining the target off-site storage from several off-site storages based on the preset off-site backup strategy. If the local backup failed, report the error reason.
[0058] In this embodiment, after local backup, the process further includes: determining whether the local backup was successful; if the local backup was successful, then executing the step of determining the target off-site storage from several off-site storages based on a preset off-site backup strategy; if the local backup failed, then reporting the reason for the error. That is, in this embodiment, after a successful local backup, an off-site backup is performed, and if the local backup fails, the reason for the backup failure must be reported.
[0059] Step S23: Based on a preset off-site backup strategy, determine the target off-site storage from several off-site storages, back up the data to be backed up in the target off-site storage, and then complete the synchronization of the data to be backed up in other off-site storages.
[0060] Step S24: When a data recovery request for data to be recovered is detected from a user terminal, it is determined whether the data to be recovered exists in the local data. If it does, the corresponding data recovery is performed based on the local data. If not, a new target off-site storage is determined from several off-site storages based on the preset off-site backup strategy, and the corresponding data recovery is performed using the new target off-site storage.
[0061] For more detailed information on steps S23 and S24, please refer to the aforementioned disclosed embodiments, which will not be elaborated upon here.
[0062] As can be seen, this application proposes a data backup and recovery method, including: obtaining the type and range of data to be backed up as defined by a user terminal, and performing local backup of the corresponding data based on the type and range; determining whether the local backup is successful; if the local backup is successful, executing the step of determining a target off-site storage from several off-site storages based on a preset off-site backup strategy; if the local backup fails, reporting the error reason; determining a target off-site storage from several off-site storages based on the preset off-site backup strategy, and backing up the data to be backed up in the target off-site storage, and then synchronizing the data to be backed up in other off-site storages; when a user is detected... When a terminal receives a data recovery request for data to be recovered, it determines whether the data to be recovered exists in the local data. If it does, it performs corresponding data recovery based on the local data. If not, it determines a new target off-site storage from several off-site storages based on the preset off-site backup strategy and performs corresponding data recovery using the new target off-site storage. Thus, this application performs backups on both local and off-site storage when backing up data, ensuring stable data backup. When recovering data, it first performs recovery based on the local data. If the data does not exist locally, it selects a target off-site storage for data recovery based on the preset off-site backup strategy, thereby ensuring rapid data recovery.
[0063] Based on the aforementioned data backup and recovery method, this application specifically includes a local storage device, a remote storage device, and a selection device. Specifically, this application first selects the type and scope of backup data using the selection device, then uses the local storage device to store the backup data locally and sets a corresponding validity period to clean up expired data and save disk space. After local backup is complete, the selection device calculates the weights of each remote storage device using a user-defined selection strategy or a default strategy, sorts them according to their calculated scores, and selects the optimal remote storage device based on the sorting results. The remote storage device is distributed storage. The default strategy is a strategy based on factors affecting data recovery, such as network and regional factors. After the optimal remote storage device completes backup, other available remote storage devices are asynchronously notified to perform incremental or full backups of the data. After backup is complete, a callback is sent to inform the user of the execution result, thus completing the entire backup process.
[0064] When data recovery is required, it is determined whether the data to be recovered exists in the local storage device. If it does, the local data is used directly for data recovery. If not, the selection device is entered. Based on the default policy, the best storage device containing the data is selected for data recovery.
[0065] Based on the aforementioned local storage device, off-site storage device, and selection device, this application, in a specific embodiment, specifically includes the following:
[0066] See Figure 3 As shown, when performing data backup, the user terminal can customize the types and categories of data to be backed up according to specific business needs, and set up manual single backup or scheduled periodic backup. This further ensures data integrity and prevents data loss. It triggers the local storage device to perform local backup and records the data's validity period for subsequent cleanup of redundant data. After the local backup is complete, it determines whether the backup was successful. If not, it reports the error reason; if successful, it uses a selection device and selects the optimal off-site storage device for off-site backup based on different selection strategies. Selection strategies include user-defined strategies and default strategies. The default strategy is based on factors affecting data recovery, such as network and region. After the backup is complete, it notifies other asynchronous storage devices to perform incremental or full backups.
[0067] See Figure 4 As shown, when performing data recovery, users can select the data to be recovered, or default to recovering the latest backup data; the system searches the local storage device to see if the data to be recovered is present. If it is, the recovery operation is performed directly; if not, the selection device is used to select the optimal off-site storage device according to different selection strategies, thereby remotely pulling the data for recovery.
[0068] Therefore, to improve data recovery speed, this application introduces a local storage device and prioritizes the use of data from this device for recovery; furthermore, by setting a reasonable selection strategy, the optimal storage device is chosen to improve data recovery speed. In addition, it should be noted that distributed geographically distributed storage devices can synchronize data through various methods such as manual synchronization, scheduled synchronization, and restart synchronization, thereby ensuring data consistency.
[0069] Accordingly, this application also discloses a data backup and recovery device, see [link to relevant documentation]. Figure 5 As shown, the device includes:
[0070] The local backup module 11 is used to obtain the feature information of the data to be backed up by the user terminal and perform local backup of the corresponding data to be backed up based on the feature information.
[0071] It should be noted that this embodiment can obtain the characteristic information of the user terminal's customized data to be backed up, and perform local backup of the corresponding data based on the characteristic information. In this way, backing up data according to the customized characteristic information can solve the problem of large data volume, improve backup speed, and save storage space.
[0072] The off-site backup module 12 is used to determine the target off-site storage from several off-site storages based on a preset off-site backup strategy, back up the data to be backed up in the target off-site storage, and then complete the synchronization of the data to be backed up in other off-site storages.
[0073] The data recovery module 13 is used to determine whether the data to be recovered exists in the local data when a data recovery request for the data to be recovered is detected from the user terminal. If it exists, the corresponding data recovery is performed based on the local data. If it does not exist, a new target off-site storage is determined from several off-site storages based on the preset off-site backup strategy, and the corresponding data recovery is performed using the new target off-site storage.
[0074] When a user terminal's data recovery request for data to be recovered is detected, it is determined whether the data to be recovered exists in the local data. If the data to be recovered exists in the local data, corresponding data recovery is performed based on the local data. If the data to be recovered does not exist in the local data, a new target off-site storage is determined from several off-site storages based on the preset off-site backup strategy, and corresponding data recovery is performed using the new target off-site storage. For example, due to the limited capacity of the local server, an effective backup time is set, and data outside the effective backup time is cleaned up to save disk space. Suppose the effective backup time of the local data is 3 months, but the user terminal wants to obtain 1 year's worth of backup data. In this case, the backup data does not exist locally, so a new target off-site storage needs to be determined from several off-site storages based on the preset off-site backup strategy, and corresponding data recovery is performed using the data in the new target off-site storage.
[0075] As can be seen, this application proposes a data backup and recovery method, including: obtaining characteristic information of data to be backed up by a user terminal, and performing local backup of the corresponding data based on the characteristic information; determining a target off-site storage from several off-site storages based on a preset off-site backup strategy, and backing up the data to be backed up in the target off-site storage, and then synchronizing the data to be backed up in other off-site storages; when a data recovery request for data to be recovered is detected from a user terminal, determining whether the data to be recovered exists in the local data, and if so, performing corresponding data recovery based on the local data; if not, determining a new target off-site storage from several off-site storages based on the preset off-site backup strategy, and performing corresponding data recovery using the new target off-site storage. Therefore, this application performs backups both locally and off-site, ensuring stable data backup; when recovering data, it first performs recovery based on the local data, and if the data does not exist locally, it selects a target off-site storage for data recovery based on the preset off-site backup strategy, thereby ensuring rapid data recovery.
[0076] In some specific embodiments, the local backup module 11 may specifically include:
[0077] The local backup unit is used to obtain the type and range of data to be backed up as defined by the user terminal, and to perform local backup of the corresponding data based on the type and range.
[0078] In some specific embodiments, after the local backup module 11, there may also be:
[0079] A backup method determination unit is used to determine the backup method, wherein the backup method includes a single backup or a scheduled periodic backup.
[0080] Accordingly, the local backup module includes:
[0081] The local backup unit is used to perform local backup of the corresponding data to be backed up based on the backup method and the feature information.
[0082] In one specific implementation, a local single backup is performed on the corresponding data to be backed up based on the feature information; in another specific implementation, a local periodic backup is performed on the corresponding data to be backed up based on the feature information. In this way, this embodiment can select the backup method to adapt to actual business needs.
[0083] In some specific embodiments, the local backup module 11 may specifically include:
[0084] The effective backup time setting unit is used to perform local backup of the corresponding data to be backed up based on the feature information and set the effective backup time.
[0085] Based on the aforementioned feature information, the corresponding data to be backed up is backed up locally, and an effective backup time is set. In this way, the present application can clean up the data in the local storage according to the effective backup time, thereby saving disk space.
[0086] In some specific embodiments, the data backup and recovery may further include:
[0087] The data cleaning unit is used to clean up the data in the local machine according to the effective backup time.
[0088] In some specific embodiments, after the local backup module 11, it may further include:
[0089] The backup result judgment unit is used to determine whether the local backup is successful; if the local backup is successful, the step of determining the target off-site storage from several off-site storages based on the preset off-site backup strategy is executed; if the local backup fails, the error reason is reported.
[0090] After performing local backup of the corresponding data to be backed up based on the feature information, the method further includes: determining whether the local backup was successful; if the local backup was successful, executing the step of determining the target off-site storage from several off-site storages based on the preset off-site backup strategy; if the local backup failed, reporting the error reason.
[0091] In some specific embodiments, the off-site backup module 12 may specifically include:
[0092] The target off-site storage determination unit is used to calculate the weight scores of the plurality of off-site storages based on the target data recovery influencing factors specified in the preset off-site backup strategy, and determine the target off-site storage from the plurality of off-site storages according to the score results.
[0093] It is understandable that by calculating the weight scores of the aforementioned factors affecting data recovery, and determining the target off-site storage from among the aforementioned off-site storage based on the score results, this embodiment enables data to be uploaded to the target off-site storage at a faster speed.
[0094] Furthermore, embodiments of this application also provide an electronic device. Figure 6 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.
[0095] Figure 6This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a display screen 23, an input / output interface 24, a communication interface 25, a power supply 26, and a communication bus 27. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the following steps:
[0096] Obtain the feature information of the user terminal's customized data to be backed up, and perform local backup of the corresponding data based on the feature information;
[0097] Based on a preset off-site backup strategy, a target off-site storage is determined from several off-site storages, and the data to be backed up is backed up in the target off-site storage. Then, the data to be backed up is synchronized in other off-site storages.
[0098] When a user terminal is detected to request data recovery for data to be recovered, it is determined whether the data to be recovered exists in the local data. If it does, the corresponding data recovery is performed based on the local data. If not, a new target off-site storage is determined from several off-site storages based on the preset off-site backup strategy, and the corresponding data recovery is performed using the new target off-site storage.
[0099] In some specific embodiments, the processor executes a computer program stored in the memory, specifically implementing the following steps:
[0100] Obtain the type and range of data to be backed up as defined by the user terminal, and perform local backup of the corresponding data based on the type and range.
[0101] In some specific embodiments, the processor, by executing a computer program stored in the memory, may further include the following steps:
[0102] Determine the backup method, wherein the backup method includes single backup or scheduled periodic backup;
[0103] Accordingly, the step of performing local backup of the corresponding data to be backed up based on the feature information includes:
[0104] Based on the backup method and the feature information, the corresponding data to be backed up is backed up locally.
[0105] In some specific embodiments, the processor executes a computer program stored in the memory, specifically implementing the following steps:
[0106] Based on the aforementioned feature information, the corresponding data to be backed up is backed up locally, and an effective backup time is set.
[0107] In some specific embodiments, the processor, by executing a computer program stored in the memory, may further include the following steps:
[0108] Clean up the data on the local machine based on the effective backup time.
[0109] In some specific embodiments, the processor, by executing a computer program stored in the memory, may further include the following steps:
[0110] Determine if the local backup was successful;
[0111] If the local backup is successful, then the step of determining the target off-site storage from several off-site storages based on the preset off-site backup strategy is executed.
[0112] If local backup fails, report the error reason.
[0113] In some specific embodiments, the processor executes a computer program stored in the memory, specifically implementing the following steps:
[0114] Based on the target data recovery influencing factors specified in the preset off-site backup strategy, the weight scores of the plurality of off-site storages are calculated, and the target off-site storage is determined from the plurality of off-site storages according to the score results.
[0115] In this embodiment, the power supply 26 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 25 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 24 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0116] Furthermore, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk, or optical disk, etc. The resources stored thereon may include computer programs 221, and the storage method may be temporary storage or permanent storage. The computer programs 221 may include, in addition to computer programs capable of performing the data backup and recovery methods executed by the electronic device 20 as disclosed in any of the foregoing embodiments, computer programs capable of performing other specific tasks.
[0117] Furthermore, embodiments of this application also disclose a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned disclosed data backup and recovery method.
[0118] For the specific steps of this method, please refer to the relevant content disclosed in the foregoing embodiments, which will not be repeated here.
[0119] The various embodiments in this application are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. For the same or similar parts between the various embodiments, refer to each other. As for the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and relevant parts can be referred to in the method section.
[0120] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0121] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0122] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0123] The above provides a detailed description of a data backup and recovery method, apparatus, device, and storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A data backup and recovery method, characterized in that, include: Obtain the feature information of the user terminal's customized data to be backed up, and perform local backup of the corresponding data based on the feature information; Based on a preset off-site backup strategy, a target off-site storage is determined from several off-site storages, and the data to be backed up is backed up in the target off-site storage. Then, the data to be backed up is synchronized in other off-site storages. When a user terminal is detected to request data recovery for data to be recovered, it is determined whether the data to be recovered exists in the local data. If it does, the corresponding data recovery is performed based on the local data. If not, a new target off-site storage is determined from several off-site storages based on the preset off-site backup strategy, and the corresponding data recovery is performed using the new target off-site storage. The step of determining the target off-site storage from several off-site storage locations based on a preset off-site backup strategy includes: Based on the target data recovery influencing factors specified in the preset off-site backup strategy, the weight scores of the plurality of off-site storages are calculated, and the target off-site storage is determined from the plurality of off-site storages according to the score results. The preset off-site backup strategy is either a user-defined selection strategy or a default strategy based on factors affecting data recovery such as network and regional factors. The multiple off-site storages are distributed storage. After the target off-site storage completes the backup, other available off-site storages are asynchronously notified to perform incremental or full backups of the data to be backed up. The other available off-site storages then notify the execution result via callback after the backup is completed.
2. The data backup and recovery method according to claim 1, characterized in that, The step of obtaining the feature information of the user terminal's customized data to be backed up, and performing local backup of the corresponding data based on the feature information, includes: Obtain the type and range of data to be backed up as defined by the user terminal, and perform local backup of the corresponding data based on the type and range.
3. The data backup and recovery method according to claim 1, characterized in that, After obtaining the characteristic information of the user terminal's customized data to be backed up, the method further includes: Determine the backup method, wherein the backup method includes single backup or scheduled periodic backup; Accordingly, the step of performing local backup of the corresponding data to be backed up based on the feature information includes: Based on the backup method and the feature information, the corresponding data to be backed up is backed up locally.
4. The data backup and recovery method according to claim 1, characterized in that, The step of performing local backup of the corresponding data to be backed up based on the feature information includes: Based on the aforementioned feature information, the corresponding data to be backed up is backed up locally, and an effective backup time is set.
5. The data backup and recovery method according to claim 4, characterized in that, Also includes: Clean up the data on the local machine based on the effective backup time.
6. The data backup and recovery method according to claim 1, characterized in that, After performing local backup of the corresponding data to be backed up based on the feature information, the process further includes: Determine if the local backup was successful; If the local backup is successful, then the step of determining the target off-site storage from several off-site storages based on the preset off-site backup strategy is executed. If local backup fails, report the error reason.
7. A data backup and recovery device, characterized in that, include: The local backup module is used to obtain the feature information of the data to be backed up by the user terminal and perform local backup of the corresponding data based on the feature information. The off-site backup module is used to determine the target off-site storage from several off-site storages based on a preset off-site backup strategy, back up the data to be backed up in the target off-site storage, and then complete the synchronization of the data to be backed up in other off-site storages. The data recovery module is used to determine whether the data to be recovered exists in the local data when a user terminal detects a data recovery request for the data to be recovered. If it does, the module performs corresponding data recovery based on the local data. If it does not, the module determines a new target off-site storage from several off-site storages based on the preset off-site backup strategy and performs corresponding data recovery using the new target off-site storage. The step of determining the target off-site storage from several off-site storage locations based on a preset off-site backup strategy includes: Based on the target data recovery influencing factors specified in the preset off-site backup strategy, the weight scores of the plurality of off-site storages are calculated, and the target off-site storage is determined from the plurality of off-site storages according to the score results. The preset off-site backup strategy is either a user-defined selection strategy or a default strategy based on factors affecting data recovery such as network and regional factors. The multiple off-site storages are distributed storage. After the target off-site storage completes the backup, other available off-site storages are asynchronously notified to perform incremental or full backups of the data to be backed up. The other available off-site storages then notify the execution result via callback after the backup is completed.
8. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the data backup and recovery method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, Used to store computer programs; wherein, when the computer programs are executed by a processor, they implement the data backup and recovery method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Data backup method, device, apparatus, and computer-readable storage medium
CN109218309A