Cloud host backup method and device, electronic equipment and readable storage medium

By establishing a connection relationship between the main storage cluster and the backup storage cluster of the cloud host, data synchronization and backup are realized, which solves the problem of the cloud host's disaster recovery function being unable to recover business data damage, and improves the high availability and data security of the cloud host. .

CN118838752APending Publication Date: 2024-10-25ZHENGZHOU INSPUR DATA TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410799545.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-19
Publication Date
2024-10-25

AI Technical Summary

Technical Problem

The disaster recovery function of existing cloud hosts cannot effectively recover business data damage caused by user misoperation or hacker intrusion, causing the cloud host business to be affected.

Method used

By establishing a connection relationship between the primary storage cluster and the backup storage cluster, data synchronization and backup are achieved. When the primary storage cluster fails, it is switched to the backup storage cluster to provide services, and data synchronization is restored after the fault is repaired to ensure the backup of cloud host data. and recovery.

Benefits of technology

Without increasing the cost of additional hardware and software, it improves the high availability and data security of the cloud host, can cope with soft and hard disasters, and ensures the integrity and availability of user data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118838752A_ABST
    Figure CN118838752A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a cloud host backup method and device, electronic equipment and a readable storage medium, and the method comprises the steps: building a connection relation between storage clusters when a main storage cluster provides a service for a cloud host; the connection relationship is used for realizing data synchronization among different storage clusters; when the main storage cluster breaks down, the connection relation is disconnected, and services are provided for the cloud host through the standby storage cluster; when the fault of the main storage cluster is repaired, the connection relation is recovered to realize data synchronization; and after data synchronization is completed, providing services for the cloud host through the main storage cluster. In the process, data backup is carried out on the cloud host through the backup storage cluster. According to the embodiment of the invention, the basic disaster recovery function of the cloud host is realized, the backup function of the cloud host is also realized, the disaster recovery function and the backup function do not influence each other, and the disaster recovery function and the backup function are combined, so that soft disasters can be coped with, and hard disasters can also be coped with.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of computer technology, and in particular to a cloud host backup method, a cloud host backup device, an electronic device, and a computer-readable storage medium. Background Art

[0002] With the rapid development of cloud computing, how to protect cloud host business data has become an urgent need for users in various industries. The most common data protection technologies in the current storage field are disaster recovery and backup. Disaster recovery means that when a business system has a primary storage failure due to natural disasters such as earthquakes and floods or human accidents, the entire business system can switch to the backup storage to ensure data persistence, so that the business can continue to provide services to the outside world. Backup is to copy user data and quickly restore the backup data to the source disk in the event of cloud host disk failure, user accidental data deletion, hacker attack, etc., so as to ensure the security of user data. The current disaster recovery and backup data protection technologies are both independent systems, suitable for cloud host business data protection in different scenarios.

[0003] The current OpenStack (a cloud platform management project) cloud platform has initially realized the basic functions of cloud host disaster recovery. However, for business data damage caused by user misoperation and hacker intrusion, the disaster recovery function of the cloud host cannot restore the damaged business data to normal, thus affecting the cloud host business. Summary of the invention

[0004] The embodiment of the present invention provides a cloud host backup method, device, electronic device and computer-readable storage medium to solve the problem that the existing disaster recovery function of the cloud host cannot restore damaged business data to normal, resulting in the cloud host business being affected.

[0005] The embodiment of the present invention discloses a cloud host backup method, comprising:

[0006] When the primary storage cluster provides services for the cloud host, a connection relationship is established between the primary storage cluster and the backup storage cluster, and data of the cloud host is backed up through the backup storage cluster; the connection relationship is used to achieve data synchronization between the primary storage cluster and the backup storage cluster;

[0007] When the primary storage cluster fails, disconnect the connection between the primary storage cluster and the backup storage cluster, provide services for the cloud host through the backup storage cluster, and back up data for the cloud host;

[0008] When the failure of the primary storage cluster is repaired, the connection relationship between the primary storage cluster and the backup storage cluster is restored to achieve data synchronization between the primary storage cluster and the backup storage cluster;

[0009] When the data synchronization between the primary storage cluster and the backup storage cluster is completed, the primary storage cluster provides services for the cloud host, and the backup storage cluster backs up data for the cloud host.

[0010] Optionally, the connection relationship has different connection directions when different storage clusters provide services for the cloud host;

[0011] When the primary storage cluster provides services for the cloud host, the data connected to the primary storage cluster will be synchronously copied to the backup storage cluster;

[0012] When the backup storage cluster provides services for the cloud host and the primary storage cluster is repaired, the data connected to the backup storage cluster will be synchronously copied to the primary storage cluster.

[0013] Optionally, the primary storage cluster includes a primary cloud hard disk, and the backup storage cluster includes a backup cloud hard disk and a backup database; and backing up data of the cloud host through the backup storage cluster includes:

[0014] Creating a backup record in the backup database; the backup record includes a backup status;

[0015] The backup data corresponding to the backup record is obtained by backing up the primary cloud hard disk or the backup cloud hard disk, the backup data is stored in the backup database, and the backup status is updated from the backup to the available status.

[0016] Optionally, after creating the backup record in the backup database, the method further includes:

[0017] Determine whether the data backup is a scheduled backup;

[0018] If the data backup is a scheduled backup, the data of the cloud host is backed up cyclically through the backup storage cluster;

[0019] If the data backup is not a scheduled backup, the data backup is directly terminated.

[0020] Optionally, after backing up the primary cloud hard disk or the backup cloud hard disk to obtain backup data, storing the backup data in the backup database, and updating the backup status from the backup status to the available status, the method further includes:

[0021] Stopping the services of the cloud host so that no data reading or writing occurs between the cloud host and the primary storage cluster or the backup storage cluster;

[0022] If the data backup is the scheduled backup, determining the target backup data at the target time in the backup database, and updating the backup status corresponding to the target backup data from the available status to the restoring status;

[0023] Determine the storage cluster corresponding to when providing services to the cloud host as the target storage cluster;

[0024] If the target storage cluster is the primary storage cluster, the primary cloud hard disk and the backup database are simultaneously mounted on the same host machine, and the target backup data is copied to the primary cloud hard disk through the host machine. After the copying is completed, the primary cloud hard disk and the backup database are unmounted from the host machine;

[0025] If the target storage cluster is the backup storage cluster, directly copying the target backup data to the backup cloud hard disk;

[0026] The backup state corresponding to the target backup data is updated from being restored to being available; the available state is used to indicate that the target backup data at the target time can be reused.

[0027] Optionally, the primary cloud hard disk and the backup cloud hard disk have different permissions when different storage clusters provide services for the cloud host;

[0028] When the primary storage cluster provides services for the cloud host, the primary cloud hard disk has read and write permissions, and the backup cloud hard disk has read permissions;

[0029] When the backup storage cluster provides services for the cloud host, the primary cloud hard disk has read permissions, and the backup cloud hard disk has read and write permissions.

[0030] Optionally, after updating the backup state corresponding to the target backup data from being restored to being available, the method further includes:

[0031] The service of the cloud host is restored, and the time corresponding to the cloud host is the target time.

[0032] The embodiment of the present invention also discloses a cloud host backup device, including:

[0033] A relationship establishment module, used for establishing a connection relationship between the primary storage cluster and the backup storage cluster when the primary storage cluster provides services for the cloud host, and backing up data of the cloud host through the backup storage cluster; the connection relationship is used to achieve data synchronization between the primary storage cluster and the backup storage cluster;

[0034] A fault switching module, used for disconnecting the connection between the primary storage cluster and the backup storage cluster when the primary storage cluster fails, providing services for the cloud host through the backup storage cluster, and backing up data for the cloud host;

[0035] A data synchronization module, used to restore the connection relationship between the primary storage cluster and the backup storage cluster when the primary storage cluster fails and is repaired, so as to achieve data synchronization between the primary storage cluster and the backup storage cluster;

[0036] The primary / standby switchback module is used to provide services for the cloud host through the primary storage cluster and to back up data for the cloud host through the standby storage cluster after data synchronization between the primary storage cluster and the standby storage cluster is completed.

[0037] The embodiment of the present invention further discloses an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0038] The memory is used to store computer programs;

[0039] The processor is used to implement the method described in the embodiment of the present invention when executing the program stored in the memory.

[0040] The embodiment of the present invention further discloses a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the embodiment of the present invention.

[0041] The embodiment of the present invention further discloses a computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, enables the processors to execute the method described in the embodiment of the present invention.

[0042] The embodiments of the present invention include the following advantages:

[0043] In an embodiment of the present invention, when the primary storage cluster provides services for the cloud host, a connection relationship is established between the primary storage cluster and the backup storage cluster, and data of the cloud host is backed up through the backup storage cluster; the connection relationship is used to achieve data synchronization between the primary storage cluster and the backup storage cluster; when the primary storage cluster fails, the connection relationship between the primary storage cluster and the backup storage cluster is disconnected, and services are provided to the cloud host through the backup storage cluster, and data of the cloud host is backed up; when the primary storage cluster failure is repaired, the connection relationship between the primary storage cluster and the backup storage cluster is restored to achieve data synchronization between the primary storage cluster and the backup storage cluster; when data synchronization between the primary storage cluster and the backup storage cluster is completed, services are provided to the cloud host through the primary storage cluster, and data of the cloud host is backed up through the backup storage cluster.

[0044] In the embodiment of the present invention, without increasing the cost of additional hardware and software, not only the basic disaster recovery function of the cloud host is realized, but also the storage cluster can be switched to ensure the continuity of the cloud host production business in the case of a failure of the main storage cluster, effectively improving the high availability of the cloud host, and the backup function of the cloud host is realized. In the case of a failure of the cloud storage cluster, the data backup function of the cloud host will not be affected, and the data at any time can be backed up, ensuring the security of user data. In addition, the disaster recovery function and the backup function in the embodiment of the present invention do not affect each other, are relatively independent, simple to operate, and have strong ease of use. Combining the disaster recovery function and the backup function can not only deal with soft disasters such as human error, software error, virus invasion, etc., but also deal with hard disasters such as hardware failure and natural disasters. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 is a schematic diagram of an application environment provided in an embodiment of the present invention;

[0046] Figure 2 is a flowchart of a cloud host backup method provided in an embodiment of the present invention;

[0047] Figure 3 It is a schematic diagram of a cloud host disaster recovery process provided in an embodiment of the present invention;

[0048] Figure 4 It is a schematic diagram of a process of cloud host backup provided in an embodiment of the present invention;

[0049] Figure 5 It is a schematic diagram of a cloud host backup and recovery process provided in an embodiment of the present invention;

[0050] Figure 6It is a structural block diagram of a cloud host backup device provided in an embodiment of the present invention;

[0051] Figure 7 is a schematic diagram of the hardware structure of an electronic device for implementing various embodiments of the present invention;

[0052] Figure 8 is a schematic diagram of a computer-readable medium provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0053] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0054] Reference Figure 1 , showing a schematic diagram of an application environment provided in an embodiment of the present invention. The embodiment of the present invention implements a cloud host disaster recovery and backup method based on OpenStack. When the primary storage cluster fails, the cloud host will perform a failover. After the primary storage cluster fails and recovers, the cloud host will perform a primary-backup switchback.

[0055] Reference Figure 2 , shows a flow chart of the steps of a cloud host backup method provided in an embodiment of the present invention, which may specifically include the following steps:

[0056] Step 201: When the primary storage cluster provides services for the cloud host, a connection relationship is established between the primary storage cluster and the backup storage cluster, and data of the cloud host is backed up through the backup storage cluster; the connection relationship is used to achieve data synchronization between the primary storage cluster and the backup storage cluster;

[0057] A partnership (connection relationship) is established between the primary storage cluster and the backup storage cluster. First, two storage clusters of the same type and in different locations are divided into the primary storage cluster and the backup storage cluster (referred to as the primary and backup clusters). The primary storage cluster provides production services for the cloud host, and the backup storage cluster provides disaster recovery services for the cloud host. After the partnership between the primary and backup storage clusters is established, data between the two clusters can be synchronized through remote replication.

[0058] In the embodiment of the present invention, Figure 1As shown in the figure, when the primary storage cluster provides services for the cloud host, the primary cloud hard disk (production cloud hard disk) in the primary storage cluster needs to be mounted on the cloud host, and the production cloud hard disk will be used as the system disk or data disk of the cloud host. At this time, the cloud host can carry out business production, and the production business is protected by disaster recovery. At this time, based on this connection relationship, the Replication (a data protection technology) function in OpenStack will synchronously copy the data of the production cloud hard disk to the disaster recovery cloud hard disk (backup cloud hard disk) on the backup storage cluster. The backup process will periodically create snapshots for the disaster recovery cloud hard disk on the backup storage cluster for backing up user data.

[0059] The embodiment of the present invention utilizes the replication function of storage, so that the data of the production cloud hard disk on the primary storage cluster and the disaster recovery cloud hard disk on the backup storage cluster can be kept consistent, effectively ensuring the integrity of the cloud host business data when the storage backend is subsequently switched.

[0060] Step 202: When the primary storage cluster fails, disconnect the connection between the primary storage cluster and the backup storage cluster, provide services for the cloud host through the backup storage cluster, and back up data for the cloud host;

[0061] In the embodiment of the present invention, when the primary storage cluster fails, the connection between the production cloud hard disk and the disaster recovery cloud hard disk is disconnected, and the cloud host performs a failover. The storage backend switches from the production cloud hard disk of the primary storage cluster to the disaster recovery cloud hard disk of the backup storage cluster. At this time, the cloud host is in the primary-backup switching state, and the disaster recovery cloud hard disk provides production services for the cloud host. In this process, the backup process is not affected, and data is always backed up by creating snapshots of the disaster recovery cloud hard disk.

[0062] Specifically, if the primary storage cluster fails, the cloud host performs a failover operation, and the storage backend connected to the cloud host will switch from the primary storage cluster to the backup storage cluster, and the disaster recovery cloud hard disk on the backup storage cluster will provide storage services for the cloud host. After the failover, the disaster recovery cloud hard disk will enable write permissions to provide storage services for the cloud host. Since the primary storage cluster has failed, the connection between the production cloud hard disk and the disaster recovery cloud hard disk is disconnected, and the data of the disaster recovery cloud hard disk will not be copied to the production cloud hard disk.

[0063] The embodiment of the present invention realizes the basic disaster recovery function of the cloud host. In the event of a failure of the primary storage cluster, the storage backend can be switched to ensure the continuity of the cloud host's production business, effectively improving the high availability of the cloud host.

[0064] Step 203: When the failure of the primary storage cluster is repaired, the connection relationship between the primary storage cluster and the backup storage cluster is restored to achieve data synchronization between the primary storage cluster and the backup storage cluster;

[0065] In an embodiment of the present invention, after the primary storage cluster failure is repaired, the connection relationship between the production cloud hard disk and the disaster recovery cloud hard disk is re-established, and the data of the disaster recovery cloud hard disk is automatically synchronized to the production cloud hard disk based on the re-established connection relationship.

[0066] Specifically, if the primary storage cluster is repaired normally, the cloud host will perform a re-protection operation, which will re-establish the connection between the disaster recovery cloud hard disk and the production cloud hard disk. The data synchronization direction is that the disaster recovery cloud hard disk is copied to the production cloud hard disk, and the disaster recovery cloud hard disk has read and write permissions, while the production cloud hard disk has only read permissions. After the connection relationship is established, the disaster recovery cloud hard disk will synchronize data with the production cloud hard disk to ensure that the data in the disaster recovery cloud hard disk and the production cloud hard disk are consistent before the primary and backup switchback.

[0067] Step 204: When data synchronization between the primary storage cluster and the backup storage cluster is completed, the primary storage cluster provides services for the cloud host, and the backup storage cluster backs up data for the cloud host.

[0068] In an embodiment of the present invention, after data synchronization is completed, the cloud host will perform a primary-backup switchback, switching the storage backend from the disaster recovery cloud hard disk of the backup storage cluster to the production cloud hard disk of the primary storage cluster, and the production cloud hard disk will continue to provide production services for the cloud host.

[0069] Specifically, after data synchronization is completed, the cloud host performs a primary-backup switchback operation, switching the storage backend connected to the cloud host from the backup storage cluster to the primary storage cluster, and the production cloud hard disk on the primary storage cluster provides storage services for the cloud host again. After the primary-backup switchback is completed, the data synchronization direction between the production cloud hard disk and the disaster recovery cloud hard disk will also switch, with data being copied from the production cloud hard disk to the disaster recovery cloud hard disk, and the production cloud hard disk has read and write permissions, while the disaster recovery cloud hard disk only has read permissions. At this point, the cloud host production business is once again protected by disaster recovery.

[0070] In the embodiment of the present invention, no matter the cloud host is in a normal state or in a master-slave switching state, a snapshot is always created through the disaster recovery cloud hard disk on the backup storage cluster to perform data backup, which will not affect the disaster recovery function of the cloud host.

[0071] Generally speaking, a cloud hard disk includes multiple data blocks. At this time, data backup can be performed by creating snapshots of multiple data blocks in the disaster recovery cloud hard disk at the same time to achieve parallel backup of multiple data blocks, thereby improving the efficiency of data backup. Parallel backup will not affect the disaster recovery function of the cloud host.

[0072] In the embodiment of the present invention, without increasing the cost of additional hardware and software, not only the basic disaster recovery function of the cloud host is realized, but also the storage cluster can be switched to ensure the continuity of the cloud host production business in the case of a failure of the main storage cluster, effectively improving the high availability of the cloud host, and the backup function of the cloud host is realized. In the case of a failure of the cloud storage cluster, the data backup function of the cloud host will not be affected, and the data at any time can be backed up, ensuring the security of user data. In addition, the disaster recovery function and the backup function in the embodiment of the present invention do not affect each other, are relatively independent, simple to operate, and have strong ease of use. The combination of the disaster recovery function and the backup function can not only cope with soft disasters such as human misoperation, software errors, and virus invasions, but also cope with hard disasters such as hardware failures and natural disasters. It is transparent to users, and users can use it directly without considering the principles of disaster recovery, backup, and backup recovery of the cloud host.

[0073] In an optional embodiment of the present invention, in step 201, when the primary storage cluster fails, disconnecting the connection between the primary storage cluster and the backup storage cluster, providing services for the cloud host through the backup storage cluster, and backing up data for the cloud host, the method further includes:

[0074] Use Cinder (block storage service provided by OpenStack) in OpenStack to create cloud disks. Cloud disks of the same specifications will be created on the primary and backup storage clusters. The cloud disk on the primary storage cluster is the production cloud disk, which has read and write permissions, and the cloud disk on the backup storage cluster is the disaster recovery cloud disk (backup cloud disk), which only has read permissions. A connection relationship is established between the two cloud disks, and the data on the production cloud disk will be synchronously copied to the disaster recovery cloud disk.

[0075] Reference Figure 3 , shows a schematic diagram of a cloud host disaster recovery process provided in an embodiment of the present invention, specifically including:

[0076] Step 301: Establish a connection between storage clusters. First, two storage clusters of the same type and in different locations are divided into primary and backup clusters. The primary storage cluster provides production services for the cloud host, and the backup storage cluster provides disaster recovery services for the cloud host. After establishing a connection between the primary and backup storage clusters, data between the two clusters can be synchronized through remote replication.

[0077] Step 302, create a cloud hard disk. When you create a cloud hard disk through Cinder, cloud hard disks of the same specifications will be created on the primary and backup storage clusters. The cloud hard disk on the primary storage cluster is the production cloud hard disk, which has read and write permissions, and the cloud hard disk on the backup storage cluster is the disaster recovery cloud hard disk, which only has read permissions. A replication relationship is established between the two cloud hard disks, and the data on the production cloud hard disk will be synchronously copied to the disaster recovery cloud hard disk.

[0078] Step 303: The cloud host mounts the cloud hard disk. The production cloud hard disk is mounted on the cloud host, where the production cloud hard disk can be used as the system disk or data disk of the cloud host. At this point, the cloud host can perform business production, and the production business is protected by disaster recovery.

[0079] Step 304, failover. If the primary storage cluster fails, the cloud host performs a failover operation, and the storage backend connected to the cloud host will switch from the primary storage cluster to the backup storage cluster, and the disaster recovery cloud hard disk on the backup storage cluster will provide storage services for the cloud host. After the failover, the disaster recovery cloud hard disk will enable write permissions to provide storage services for the cloud host. Because the primary storage cluster has failed, the replication relationship between the production cloud hard disk and the disaster recovery cloud hard disk is disconnected, and the data of the disaster recovery cloud hard disk will not be copied to the production cloud hard disk.

[0080] Step 305: Re-protection. If the primary storage cluster is repaired normally, the cloud host will perform a re-protection operation. Re-protection will re-establish the replication relationship between the disaster recovery cloud hard disk and the production cloud hard disk. The data synchronization direction is that the disaster recovery cloud hard disk is replicated to the production cloud hard disk. The disaster recovery cloud hard disk has read and write permissions, and the production cloud hard disk has only read permissions.

[0081] Step 306: Data synchronization: After the replication relationship is established, the disaster recovery cloud hard disk will synchronize data with the production cloud hard disk to ensure that the data in the disaster recovery cloud hard disk and the production cloud hard disk are consistent before the primary and standby switchback.

[0082] Step 307, active-standby switchback. After data synchronization is completed, the cloud host performs an active-standby switchback operation, switches the storage backend connected to the cloud host from the standby storage cluster to the primary storage cluster, and the production cloud hard disk on the primary storage cluster provides storage services for the cloud host again. After the active-standby switchback is completed, the data synchronization direction of the production cloud hard disk and the disaster recovery cloud hard disk will also switch, with data copied from the production cloud hard disk to the disaster recovery cloud hard disk, and the production cloud hard disk has read and write permissions, while the disaster recovery cloud hard disk only has read permissions. At this point, the cloud host's production business is once again protected by disaster recovery.

[0083] In one embodiment of the present invention, the connection relationship has different connection directions when different storage clusters provide services for the cloud host;

[0084] When the primary storage cluster provides services for the cloud host, the data connected to the primary storage cluster will be synchronously copied to the backup storage cluster;

[0085] When the backup storage cluster provides services for the cloud host and the primary storage cluster is repaired, the data connected to the backup storage cluster will be synchronously copied to the primary storage cluster.

[0086] In the embodiment of the present invention, the directionality of the connection relationship is dynamically adjusted to adapt to the scenario where different storage clusters provide services for the cloud host.

[0087] like Figure 1 As shown in the figure, when the primary storage cluster provides services for the cloud host, the connection direction corresponding to the connection relationship (i.e. Figure 1 The arrow in the figure points to the primary storage cluster to the backup storage cluster. At this time, based on this connection relationship, the data of the production cloud hard disk will be synchronously copied to the disaster recovery cloud hard disk on the backup storage cluster.

[0088] When the backup storage cluster provides services to the cloud host, the connection direction corresponding to the connection relationship (i.e. Figure 1 The arrow in the figure points to the backup storage cluster to the primary storage cluster. At this time, based on this connection relationship, the data of the disaster recovery cloud hard disk will be automatically synchronized to the production cloud hard disk. Specifically, if the primary storage cluster has not yet completed the fault repair, since the connection relationship between the primary storage cluster and the backup storage cluster has not been reestablished, the data of the disaster recovery cloud hard disk will not be automatically synchronized to the production cloud hard disk when the primary storage cluster has not completed the fault repair.

[0089] Another connection direction is that when the data of the disaster recovery cloud hard disk is automatically synchronized to the production cloud hard disk, the cloud host will perform a primary-backup switchback. At this time, the connection direction corresponding to the connection relationship (i.e. Figure 1 The storage cluster will be automatically switched from the primary storage cluster to the backup storage cluster.

[0090] In an embodiment of the present invention, the primary storage cluster includes a primary cloud hard disk, and the backup storage cluster includes a backup cloud hard disk and a backup database; and backing up data of the cloud host through the backup storage cluster includes:

[0091] Creating a backup record in the backup database; the backup record includes a backup status;

[0092] The backup data corresponding to the backup record is obtained by backing up the primary cloud hard disk or the backup cloud hard disk, the backup data is stored in the backup database, and the backup status is updated from the backup to the available status.

[0093] In the embodiment of the present invention, when the cloud host backup is created, a backup record is first created in the backup database to record the backup name, backup status, source cloud hard disk name, creation time and other information, which will be used in subsequent backup and recovery. The backup status at this time will be set to backing up.

[0094] Data is backed up by creating snapshots through the disaster recovery cloud hard disk. The created snapshot is the backup data of the cloud host. After the backup data is created, the backup database is updated to save the backup data of the cloud host on the backup storage cluster, and the backup status is updated from backup to available status, indicating that the backup of the cloud host is completed. The backup data can be used to restore the business data of the cloud host when the data is lost or damaged, which improves the system's fault tolerance and data recovery capabilities.

[0095] The backup status field in the backup record allows the system to track the progress of the backup task. The update from "Backing up" to "Available" provides visualization of the backup process, allowing administrators to monitor the status of the backup task in real time, promptly discover and solve problems that may arise during the backup process, and the backup status can directly indicate whether the backup data is available.

[0096] By creating backup records in the backup database and using the backup cloud hard disk for data backup, the integrity and security of the cloud host data is ensured, the resource usage of the primary storage cluster can be optimized, and the impact of backup operations on the performance of the primary storage cluster can be avoided.

[0097] In one embodiment of the present invention, after creating the backup record in the backup database, the method further includes:

[0098] Determine whether the data backup is a scheduled backup;

[0099] If the data backup is a scheduled backup, the data of the cloud host is backed up cyclically through the backup storage cluster;

[0100] If the data backup is not a scheduled backup, the data backup is directly terminated.

[0101] In the embodiment of the present invention, it is necessary to determine whether the backup is a scheduled backup based on the scheduled time. If the scheduled time is set to a non-zero parameter, it indicates a scheduled backup. The system creates snapshots of the disaster recovery cloud hard disk in a loop to perform data backup according to the set scheduled time. If the scheduled time is set to a zero parameter, it indicates a non-scheduled backup, and the system will directly end the backup.

[0102] By determining whether the backup is scheduled, the system can allocate resources reasonably according to actual needs. Scheduled backups are usually performed when the system load is low to reduce the impact on normal business. If the backup is not scheduled, the system can end the backup directly to avoid unnecessary resource consumption, especially when system resources are tight or during business peak hours. This design can ensure that key businesses are not affected by backup operations.

[0103] When data backup is scheduled, the system can automatically execute the backup task according to the preset strategy, improving the efficiency and accuracy of the backup operation.

[0104] Reference Figure 4 , shows a schematic diagram of a cloud host backup process provided in an embodiment of the present invention, specifically including:

[0105] Step 401, create a backup record. After starting to create a cloud host backup, first create a backup record in the database to record the backup name, backup status, source cloud hard disk name, creation time and other information, which will be used for subsequent backup and recovery. The backup status will be set to backing up.

[0106] Step 402: Create a snapshot of the disaster recovery cloud hard disk. The backup data of the cloud host is stored in the backup storage cluster. The snapshot is created through the disaster recovery cloud hard disk to back up the data. The created snapshot is the backup data of the cloud host.

[0107] Step 403: Update the backup record. After the backup data is created, the database is updated to update the backup status to the available status, indicating that the cloud host backup is complete and the backup data can be used to restore the cloud host service data.

[0108] Step 404: Determine whether it is a scheduled backup. Determine whether the backup is a scheduled backup based on the scheduled time. If the scheduled time is set to a non-zero parameter, it indicates a scheduled backup. The system creates snapshots of the disaster recovery cloud hard disk in a loop to perform data backup according to the set scheduled time. If the scheduled time is set to a zero parameter, it indicates a non-scheduled backup, and the system will directly end the backup.

[0109] In an embodiment of the present invention, after backing up the primary cloud hard disk or the backup cloud hard disk to obtain backup data, storing the backup data in the backup database, and updating the backup status from the backup to the available status, the method further includes:

[0110] Stopping the services of the cloud host so that no data reading or writing occurs between the cloud host and the primary storage cluster or the backup storage cluster;

[0111] If the data backup is the scheduled backup, determining the target backup data at the target time in the backup database, and updating the backup status corresponding to the target backup data from the available status to the restoring status;

[0112] Determine the storage cluster corresponding to when providing services to the cloud host as the target storage cluster;

[0113] If the target storage cluster is the primary storage cluster, the primary cloud hard disk and the backup database are simultaneously mounted on the same host machine, and the target backup data is copied to the primary cloud hard disk through the host machine. After the copying is completed, the primary cloud hard disk and the backup database are unmounted from the host machine;

[0114] If the target storage cluster is the backup storage cluster, directly copying the target backup data to the backup cloud hard disk;

[0115] The backup state corresponding to the target backup data is updated from being restored to being available; the available state is used to indicate that the target backup data at the target time can be reused.

[0116] In the embodiment of the present invention, when a cloud host encounters soft disasters such as human error, software error, virus invasion, or hard disasters such as hardware failure, natural disaster, etc., it is necessary to restore the backup data to quickly restore business operations, reduce downtime, and maintain business continuity. For backup recovery, the backup data needs to be restored to the source cloud hard disk. For a cloud host in a normal state, backup recovery is to restore the backup data to the production cloud hard disk, and for a cloud host in a master-slave switching state, backup recovery is to restore the backup data to the disaster recovery cloud hard disk.

[0117] During the backup and restore process, the backup status is updated from "Available" to "Restoring", indicating that the backup data is being used for the restore operation. After the restore is completed, the status is updated to "Available" again, indicating that the restore operation has been completed and the backup data can be used for restore again. The purpose of modifying the backup status is to track the progress of the backup and restore process and ensure the availability of the backup data and the correctness of the restore operation.

[0118] For backup and recovery, the backup data needs to be restored to the source cloud hard disk. For a cloud host in normal state, backup and recovery is to restore the backup data to the production cloud hard disk, and for a cloud host in active-standby switching state, backup and recovery is to restore the backup data to the disaster recovery cloud hard disk. Therefore, it is necessary to determine that the storage cluster providing services for the cloud host at this time is the target storage cluster, and the cloud hard disk in the target storage cluster is the source cloud hard disk.

[0119] Since the production cloud hard disk and the backup database are located in different storage clusters, in order for the production cloud hard disk to directly access and operate the backup database during the recovery process, the production cloud hard disk and the backup database need to be mounted on the host machine at the same time, and the backup data in the backup database is copied to the production cloud hard disk through the host machine. After the copy is completed, in order to ensure data consistency and security, and to avoid data conflicts or damage during the recovery process, the production cloud hard disk and the backup database need to be uninstalled from the host machine.

[0120] The embodiment of the present invention realizes the scheduled backup and backup recovery functions of the cloud host. When the business data of the cloud host is destroyed, the backup recovery can restore the data to the data at any time before the destruction, thereby ensuring the security of user data.

[0121] In one embodiment of the present invention, the primary cloud hard disk and the backup cloud hard disk have different permissions when different storage clusters provide services for the cloud host;

[0122] When the primary storage cluster provides services for the cloud host, the primary cloud hard disk has read and write permissions, and the backup cloud hard disk has read permissions;

[0123] When the backup storage cluster provides services for the cloud host, the primary cloud hard disk has read permissions, and the backup cloud hard disk has read and write permissions.

[0124] In a storage system, read and write permissions are generally used to determine the types of operations that a user or system can perform on data. In an embodiment of the present invention, read and write permissions corresponding to cloud hard disks in different situations are set to ensure data consistency, security, and system reliability.

[0125] Specifically, the read permission allows reading data from the storage device, and the write permission allows writing new data to the storage device or modifying existing data. Here, the primary cloud hard disk and the backup cloud hard disk can be used as two independent storage devices.

[0126] When the primary storage cluster is running normally, the production cloud hard disk (primary cloud hard disk) needs to have read and write permissions so that the cloud host can update data in real time. The backup cloud hard disk (disaster recovery cloud hard disk) only has read permissions, which can ensure that the backup data is consistent with the production data and avoid data inconsistency caused by write operations.

[0127] When the primary storage cluster fails, a failover is required. At this time, the backup cloud hard disk needs to have write permissions enabled so that the cloud host can continue to write data to ensure business continuity.

[0128] After the primary storage cluster is repaired, if the production cloud disk immediately restores write permissions, it may cause conflicts with the data on the backup cloud disk. Therefore, before confirming data synchronization and consistency, the production cloud disk only restores read permissions to prevent data conflicts.

[0129] By limiting the write permissions of the backup cloud hard disk, you can prevent accidental or malicious modification of the backup data, ensure the integrity and security of the backup data, reduce unnecessary I / O (Input / Output) operations, optimize the use of storage resources, and improve system performance.

[0130] By setting different read and write permissions in different situations, data access and modification can be effectively managed to ensure that data integrity, security and system reliability are maintained in all situations.

[0131] In an embodiment of the present invention, after updating the backup state corresponding to the target backup data from recovery to available state, the method further includes:

[0132] The service of the cloud host is restored, and the time corresponding to the cloud host is the target time.

[0133] In the embodiment of the present invention, the backup record corresponding to the backup data records the creation time, because the backup data is created at a certain time point or time interval, and these backup data record the state of the cloud host at a specific time, so the backup database contains the backup data corresponding to different times. You can select specific backup data according to the creation time in the backup record, and then restore the cloud host to the state when the backup data was created, that is, the cloud host state corresponding to the target time.

[0134] Moreover, in the embodiment of the present invention, regardless of whether the current disaster recovery state of the cloud host is in a normal state or a master-slave switching state, the business data of the cloud host can be restored to the corresponding state at a specified time according to user needs, thereby effectively ensuring the security of user data.

[0135] The cloud host disaster recovery and backup method provided in the embodiment of the present invention does not damage internal business data during the disaster recovery and backup process. Since the backup and recovery process has data backup, even if the operation fails, it can be restored again without damaging user data, thus effectively ensuring the security of user data.

[0136] Reference Figure 5 , shows a schematic diagram of a cloud host backup and recovery process provided in an embodiment of the present invention, specifically including:

[0137] Step 501: Shut down the cloud host. To back up and restore the cloud host, the cloud host must be shut down and its services must be stopped to ensure that no data reading or writing occurs on the connected storage backend.

[0138] Step 502: Modify the backup status. For scheduled backup, the cloud host data can be restored to the state at any time. Select a backup at a certain time, and modify the backup status in the backup record of the database to restore. No other operations are allowed on the backup during the backup and restore period.

[0139] Step 503, the backup database copies data to the source cloud hard disk. First, it is necessary to determine the disaster recovery status of the cloud host. If the cloud host is in a normal state, that is, the storage backend connected to the cloud host is the production cloud hard disk, the production cloud hard disk and the backup database need to be mounted on the host at the same time, and the backup data in the backup database is copied to the production cloud hard disk through the host. After the copy is completed, the production cloud hard disk and the backup database are uninstalled from the host; if the cloud host is in a master-slave switching state, that is, the storage backend connected to the cloud host is a disaster recovery cloud hard disk, the local replication function of the storage cluster is used to directly copy the backup data in the backup database to the disaster recovery cloud hard disk.

[0140] Step 504: Update the backup status. After the backup database is copied to the source cloud hard disk, the backup status in the database backup record is changed from being restored to being available, indicating that the backup can be reused and the business data at that moment can be restored repeatedly.

[0141] Step 505: Start the cloud host. After the backup and recovery is completed, the cloud host is started up. At this time, the business data of the cloud host has been restored to the state at the specified time, and production business can continue.

[0142] In the embodiment of the present invention, without increasing the cost of additional hardware and software, not only the basic disaster recovery function of the cloud host is realized, but also the storage cluster can be switched to ensure the continuity of the cloud host production business in the case of a failure of the main storage cluster, effectively improving the high availability of the cloud host, and the backup function of the cloud host is realized. In the case of a failure of the cloud storage cluster, the data backup function of the cloud host will not be affected, and the data at any time can be backed up, ensuring the security of user data. In addition, the disaster recovery function and the backup function in the embodiment of the present invention do not affect each other, are relatively independent, simple to operate, and have strong ease of use. Combining the disaster recovery function and the backup function can not only deal with soft disasters such as human error, software error, virus invasion, etc., but also deal with hard disasters such as hardware failure and natural disasters.

[0143] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0144] Reference Figure 6 , shows a structural block diagram of a cloud host backup device provided in an embodiment of the present invention, which may specifically include the following modules:

[0145] A relationship establishment module 601 is used to establish a connection relationship between the primary storage cluster and the backup storage cluster when the primary storage cluster provides services for the cloud host, and to perform data backup on the cloud host through the backup storage cluster; the connection relationship is used to achieve data synchronization between the primary storage cluster and the backup storage cluster;

[0146] A failover module 602 is configured to disconnect the connection between the primary storage cluster and the backup storage cluster when the primary storage cluster fails, provide services for the cloud host through the backup storage cluster, and perform data backup on the cloud host;

[0147] The data synchronization module 603 is used to restore the connection relationship between the primary storage cluster and the backup storage cluster when the primary storage cluster fails and is repaired, so as to achieve data synchronization between the primary storage cluster and the backup storage cluster;

[0148] The primary / standby switchback module 604 is used to provide services for the cloud host through the primary storage cluster and to back up data for the cloud host through the standby storage cluster after data synchronization between the primary storage cluster and the standby storage cluster is completed.

[0149] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0150] In addition, an embodiment of the present invention further provides an electronic device, including: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, each process of the above-mentioned cloud host backup method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0151] The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, each process of the above-mentioned cloud host backup method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0152] An embodiment of the present invention also provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned cloud host backup method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0153] Figure 7 A schematic diagram of the hardware structure of an electronic device for implementing various embodiments of the present invention.

[0154] The electronic device 700 includes but is not limited to: a radio frequency unit 701, a network module 702, an audio output unit 703, an input unit 704, a sensor 705, a display unit 706, a user input unit 707, an interface unit 708, a memory 709, a processor 710, and a power supply 711. Those skilled in the art will appreciate that Figure 7 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and the electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. In the embodiments of the present invention, the electronic device includes but is not limited to a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted terminal, a wearable device, and a pedometer.

[0155] It should be understood that in the embodiment of the present invention, the radio frequency unit 701 can be used for receiving and sending signals during information transmission or communication. Specifically, after receiving downlink data from the base station, it is sent to the processor 710 for processing; in addition, uplink data is sent to the base station. Generally, the radio frequency unit 701 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, etc. In addition, the radio frequency unit 701 can also communicate with the network and other devices through a wireless communication system.

[0156] The electronic device provides users with wireless broadband Internet access through the network module 702, such as helping users to send and receive emails, browse web pages, and access streaming media.

[0157] The audio output unit 703 can convert the audio data received by the RF unit 701 or the network module 702 or stored in the memory 709 into an audio signal and output it as sound. Moreover, the audio output unit 703 can also provide audio output related to a specific function performed by the electronic device 700 (for example, a call signal reception sound, a message reception sound, etc.). The audio output unit 703 includes a speaker, a buzzer, a receiver, etc.

[0158] The input unit 704 is used to receive audio or video signals. The input unit 704 may include a graphics processor (GPU) 7041 and a microphone 7042, and the graphics processor 7041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The processed image frame can be displayed on the display unit 706. The image frame processed by the graphics processor 7041 can be stored in the memory 709 (or other storage medium) or sent via the radio frequency unit 701 or the network module 702. The microphone 7042 can receive sound and can process such sound into audio data. The processed audio data can be converted into a format output that can be sent to a mobile communication base station via the radio frequency unit 701 in the case of a telephone call mode.

[0159] The electronic device 700 also includes at least one sensor 705, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 7061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 7061 and / or the backlight when the electronic device 700 is moved to the ear. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary, which can be used to identify the posture of the electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; the sensor 705 can also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which will not be repeated here.

[0160] The display unit 706 is used to display information input by the user or information provided to the user. The display unit 706 may include a display panel 7061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.

[0161] The user input unit 707 can be used to receive input digital or character information, and to generate key signal input related to user settings and function control of the electronic device. Specifically, the user input unit 707 includes a touch panel 7071 and other input devices 7072. The touch panel 7071, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on the touch panel 7071 or near the touch panel 7071 using any suitable object or accessory such as a finger, stylus, etc.). The touch panel 7071 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the contact point coordinates, and then sends it to the processor 710, receives the command sent by the processor 710 and executes it. In addition, the touch panel 7071 can be implemented using multiple types such as resistive, capacitive, infrared and surface acoustic waves. In addition to the touch panel 7071, the user input unit 707 may also include other input devices 7072. Specifically, other input devices 7072 may include but are not limited to a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail here.

[0162] Furthermore, the touch panel 7071 may be overlaid on the display panel 7061. When the touch panel 7071 detects a touch operation on or near it, it transmits the information to the processor 710 to determine the type of the touch event. Then, the processor 710 provides a corresponding visual output on the display panel 7061 according to the type of the touch event. Figure 7 In the figure, the touch panel 7071 and the display panel 7061 are used as two independent components to realize the input and output functions of the electronic device. However, in some embodiments, the touch panel 7071 and the display panel 7061 can be integrated to realize the input and output functions of the electronic device, which is not limited here.

[0163] The interface unit 708 is an interface for connecting an external device to the electronic device 700. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, etc. The interface unit 708 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the electronic device 700 or may be used to transmit data between the electronic device 700 and an external device.

[0164] The memory 709 can be used to store software programs and various data. The memory 709 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 709 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0165] The processor 710 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. It executes various functions of the electronic device and processes data by running or executing software programs and / or modules stored in the memory 709, and calling data stored in the memory 709, so as to monitor the electronic device as a whole. The processor 710 may include one or more processing units; preferably, the processor 710 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 710.

[0166] The electronic device 700 may also include a power supply 711 (such as a battery) for supplying power to each component. Preferably, the power supply 711 may be logically connected to the processor 710 through a power management system, thereby implementing functions such as charging, discharging, and power consumption management through the power management system.

[0167] In addition, the electronic device 700 includes some functional modules not shown, which will not be described in detail here.

[0168] like Figure 8 As shown, in another embodiment provided by the present invention, a computer-readable storage medium 801 is also provided, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer executes the cloud host backup method described in the above embodiment.

[0169] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0170] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0171] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.

[0172] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the embodiments of the present invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0173] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0174] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0175] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0176] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0177] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical disks.

[0178] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A cloud host backup method, It is characterized in that include: When the primary storage cluster provides services for the cloud host, a connection relationship is established between the primary storage cluster and the backup storage cluster, and data of the cloud host is backed up through the backup storage cluster; The connection relationship is used to achieve data synchronization between the primary storage cluster and the backup storage cluster; When the primary storage cluster fails, disconnect the connection between the primary storage cluster and the backup storage cluster, provide services for the cloud host through the backup storage cluster, and back up data for the cloud host; When the failure of the primary storage cluster is repaired, the connection relationship between the primary storage cluster and the backup storage cluster is restored to achieve data synchronization between the primary storage cluster and the backup storage cluster; When the data synchronization between the primary storage cluster and the backup storage cluster is completed, the primary storage cluster provides services for the cloud host, and the backup storage cluster backs up data for the cloud host.

2. The method according to claim 1, It is characterized in that The connection relationship has different connection directions when different storage clusters provide services for the cloud host; When the primary storage cluster provides services for the cloud host, the data connected to the primary storage cluster will be synchronously copied to the backup storage cluster; When the backup storage cluster provides services for the cloud host and the primary storage cluster is repaired, the data connected to the backup storage cluster will be synchronously copied to the primary storage cluster.

3. The method according to claim 1, It is characterized in that The primary storage cluster includes a primary cloud hard disk, and the backup storage cluster includes a backup cloud hard disk and a backup database; The backing up data of the cloud host by using the backup storage cluster includes: Creating a backup record in the backup database; the backup record includes a backup status; The backup data corresponding to the backup record is obtained by backing up the primary cloud hard disk or the backup cloud hard disk, the backup data is stored in the backup database, and the backup status is updated from the backup to the available status.

4. The method according to claim 3, It is characterized in that After creating the backup record in the backup database, the method further includes: Determine whether the data backup is a scheduled backup; If the data backup is a scheduled backup, the data of the cloud host is backed up cyclically through the backup storage cluster; If the data backup is not a scheduled backup, the data backup is directly terminated.

5. The method according to claim 4, It is characterized in that After backing up the primary cloud hard disk or the backup cloud hard disk to obtain backup data, storing the backup data in the backup database, and updating the backup status from the backup to the available status, the method further includes: Stopping the services of the cloud host so that no data reading or writing occurs between the cloud host and the primary storage cluster or the backup storage cluster; If the data backup is the scheduled backup, determining the target backup data at the target time in the backup database, and updating the backup status corresponding to the target backup data from the available status to the restoring status; Determine the storage cluster corresponding to when providing services to the cloud host as the target storage cluster; If the target storage cluster is the primary storage cluster, the primary cloud hard disk and the backup database are simultaneously mounted on the same host machine, and the target backup data is copied to the primary cloud hard disk through the host machine. After the copying is completed, the primary cloud hard disk and the backup database are unmounted from the host machine; If the target storage cluster is the backup storage cluster, directly copying the target backup data to the backup cloud hard disk; The backup state corresponding to the target backup data is updated from being restored to being available; the available state is used to indicate that the target backup data at the target time can be reused.

6. The method according to claim 3, It is characterized in that The primary cloud hard disk and the backup cloud hard disk have different permissions when different storage clusters provide services for the cloud host; When the primary storage cluster provides services for the cloud host, the primary cloud hard disk has read and write permissions, and the backup cloud hard disk has read permissions; When the backup storage cluster provides services for the cloud host, the primary cloud hard disk has read permissions, and the backup cloud hard disk has read and write permissions.

7. The method according to claim 5, It is characterized in that After updating the backup state corresponding to the target backup data from recovery to available state, the method further includes: The service of the cloud host is restored, and the time corresponding to the cloud host is the target time.

8. A cloud host backup device, It is characterized in that include: A relationship establishment module, used to establish a connection relationship between the primary storage cluster and the backup storage cluster when the primary storage cluster provides services for the cloud host, and to perform data backup on the cloud host through the backup storage cluster; The connection relationship is used to achieve data synchronization between the primary storage cluster and the backup storage cluster; A fault switching module, used for disconnecting the connection between the primary storage cluster and the backup storage cluster when the primary storage cluster fails, providing services for the cloud host through the backup storage cluster, and backing up data for the cloud host; A data synchronization module, used to restore the connection relationship between the primary storage cluster and the backup storage cluster when the primary storage cluster fails and is repaired, so as to achieve data synchronization between the primary storage cluster and the backup storage cluster; The primary / standby switchback module is used to provide services for the cloud host through the primary storage cluster and to back up data for the cloud host through the standby storage cluster after data synchronization between the primary storage cluster and the standby storage cluster is completed.

9. An electronic device, It is characterized in that It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; The memory is used to store computer programs; The processor is used to implement the method according to any one of claims 1 to 7 when executing the program stored in the memory.

10. A computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, cause the processors to perform the method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Disaster recovery control method and device, computer equipment and storage medium

    CN119520244A