Data backup method and related apparatus
Patent Information
- Application Number
- CN202211450646.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-18
- Publication Date
- 2026-08-28
- Estimated Expiration
- 2042-11-18
AI Technical Summary
[0021]可以看出,本申请实施例中,通过接收文件处理请求,其中,所述文件处理请求包括文件同步请求和文件调用请求中至少一个;若为所述文件同步请求,则根据文件同步请求在第一集群中执行目标操作;获取第一集群的配置信息,根据配置信息确定目标同步链接,在目标同步链接对应的第二集群中执行目标操作;若文件处理请求为文件调用请求,则根据文件调用请求从第三集群中获取目标文件;若第三集群中不存在目标文件,则获取第三集群的配置信息;根据配置信息确定目标转调链接,在目标转调链接对应的第四集群中获取目标文件。如此可以实现通过配置灾备集群间文件调用链接和文件同步链接,调整文件同步和删除功能,进而实现多环境多实例的文件备份、平滑进行灾备切换和文件调用服务。
Smart Images

Figure CN115904808B_ABST
Abstract
Claims
1. A data disaster recovery method, characterized by, Applied to a file management system, the method includes: Receive a file processing request, wherein the file processing request includes at least one of a file synchronization request and a file call request; If the file processing request is the file synchronization request, then the target operation is executed in the first cluster according to the file synchronization request, wherein the target operation includes at least one of a file upload operation and a file deletion operation; Obtain the configuration information of the first cluster, determine the target synchronization link based on the configuration information, and execute the target operation in the second cluster corresponding to the target synchronization link, wherein the target synchronization link is used to realize the jump between the first cluster and the second cluster; If the file processing request is the file call request, then the target file is obtained from the third cluster according to the file call request; If the target file does not exist in the third cluster, then the configuration information of the third cluster is obtained; The target redirection link is determined based on the configuration information, and the target file is obtained from the fourth cluster corresponding to the target redirection link; wherein, the configuration information of the first cluster or the configuration information of the third cluster includes at least one of the following: service switch configuration information and routing configuration information.
2. The method of claim 1, wherein, Before receiving the file processing request, the method further includes: Deploy at least one system environment, wherein each system environment in the at least one system environment includes an instance and a cluster corresponding to the instance, and the cluster includes a first cluster, a second cluster, a third cluster, and a fourth cluster; The configuration information of the cluster is set, wherein the configuration information includes a switching link and a synchronization link, the switching link and the synchronization link are used to realize the jump between the clusters, the switching link includes the target switching connection, and the synchronization link includes the target synchronization link; Configure the service switch information of the cluster, wherein the service switch configuration information includes: the switching link and the switching switch information corresponding to the switching link, the synchronization link and the synchronization switch information corresponding to the synchronization link, the switching link and the synchronization link are used to realize the jump between the clusters, the switching link includes the target switching connection, and the synchronization link includes the target synchronization link; Configure the routing configuration information of the cluster, wherein the routing configuration information is used to determine the storage path and index information of the file; The configuration information is determined based on the service switch configuration information and the routing configuration information.
3. The method according to claim 2, characterized in that, The file synchronization request includes a type identifier for the target operation, and each system environment also includes a corresponding database; The step of performing the target operation in the first cluster according to the file synchronization request includes: The type of the target operation is determined based on the type identifier; If the target operation is determined to be the file upload operation, then obtain the file to be uploaded; The storage path and index information of the file to be uploaded are determined based on the routing configuration information of the first cluster. The file to be uploaded is stored in the first cluster according to the storage path, and the index information of the file to be uploaded is stored in the database; Update the binary log, wherein the binary log is used to record the update records of the database; If the target operation is determined to be the file deletion operation, then the storage path and index information of the file to be deleted are obtained; According to the storage path of the file to be deleted, delete the file to be deleted in the first cluster, and delete the index information of the file to be deleted in the database; Update the binary log.
4. The method according to claim 3, characterized in that, Each instance includes at least one thread, and the thread includes a synchronization thread; After updating the binary log, the method further includes: The incremental data of the binary log is obtained through the synchronization thread, wherein the incremental data includes the type identifier, timestamp, index information and binary data of the storage path of the target operation; The synchronization thread calls the synchronization interface corresponding to the synchronization link of the first cluster, and performs the target operation in the second cluster based on the incremental data and the synchronization interface.
5. The method according to claim 4, characterized in that, Before executing the target operation in the second cluster based on the incremental data and the synchronization interface, the method further includes: Obtain the service switch configuration information of the second cluster, and determine the state of the synchronization interface based on the synchronization switch information, wherein the state includes at least one of the following: on state and off state; If the synchronization interface is determined to be in the enabled state, the target operation is executed in the second cluster to achieve file synchronization between the first cluster and the second cluster; If the synchronization interface is determined to be in the closed state, then the synchronization thread is terminated.
6. The method according to claim 5, characterized in that, After determining the target redirection link based on the configuration information, the method further includes: Obtain the modulation switch information of the target modulation link, and determine the state of the modulation interface corresponding to the target modulation link based on the modulation switch information; If the state of the switching interface is determined to be the open state, the target file is obtained from the fourth cluster through the switching interface; If the state of the switching interface is determined to be the closed state, then the current search thread for the target file is terminated.
7. The method according to claim 6, characterized in that, The step of obtaining the target file from the fourth cluster through the switching interface includes: Obtain the index information of the target file; The binary file of the target file is obtained from the fourth cluster based on the index information and the switching interface; The storage path of the target file in the fourth cluster is determined based on the binary file; The target file is obtained from the fourth cluster according to the storage path.
8. A data disaster recovery device, characterized in that, The device includes a receiving unit, an execution unit, and an acquisition unit, wherein, The receiving unit is configured to receive a file processing request, wherein the file processing request includes at least one of a file synchronization request and a file call request; The execution unit is configured to perform a target operation in the first cluster according to the file synchronization request if the file processing request is the file synchronization request, wherein the target operation includes at least one of a file upload operation and a file deletion operation; The acquisition unit is configured to acquire configuration information of the first cluster, determine a target synchronization link based on the configuration information, and execute the target operation in the second cluster corresponding to the target synchronization link, wherein the target synchronization link is used to enable switching between the first cluster and the second cluster; and, if the file processing request is the file call request, acquire the target file from the third cluster based on the file call request. The acquisition unit is further configured to acquire the configuration information of the third cluster if the target file does not exist in the third cluster. The execution unit is further configured to determine the target redirection link based on the configuration information, and obtain the target file in the fourth cluster corresponding to the target redirection link; wherein the configuration information of the first cluster or the configuration information of the third cluster includes at least one of the following: service switch configuration information and routing configuration information.
9. An electronic device, characterized in that, The method includes a processor, a memory, a communication interface, and one or more programs, said programs being stored in the memory and configured to be executed by the processor, said programs including instructions for performing the steps of the method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, A computer program for storing electronic data interchange is provided, wherein the computer program causes a computer to perform the method as described in any one of claims 1-7.
Citation Information
Patent Citations
Data storage disaster recovery method and system
CN114116326A
Data synchronization method and device, equipment and medium
CN115129676A