Data migration method and device, server, and storage medium

By monitoring server hardware status and migrating data to a matching target server, the problem of data mismatch caused by hardware failure of elastic bare metal servers was solved, ensuring the accuracy of data migration and business continuity.

CN116775596BActive Publication Date: 2026-01-23CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211430051.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-15
Publication Date
2026-01-23
Estimated Expiration
2042-11-15

AI Technical Summary

Technical Problem

When the hardware of an elastic bare metal server fails, existing technical solutions result in data mismatch, affecting user services and causing slow fault recovery.

Method used

By monitoring the server hardware status, when a preset threshold is reached, the data to be migrated is obtained, the matching target server is determined, and the data is migrated from the source server to the target server, including unbinding the data from the source server and binding it to the target server.

Benefits of technology

It ensured the accuracy and consistency of data migration, guaranteed data integrity and business continuity, and reduced business downtime.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116775596B_ABST
    Figure CN116775596B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a data migration method and device, a server and a storage medium. The method can comprise: when a hardware monitoring index of a source server is greater than or equal to a preset threshold, obtaining to-be-migrated data of the source server; determining a target server matched with the source server based on the to-be-migrated data; and migrating the to-be-migrated data from the source server to the target server. Through the embodiments of the present disclosure, the accuracy and consistency of data migration can be ensured; at the same time, the nodes of the source server and the target server are kept consistent, thereby ensuring the integrity of the to-be-migrated data and realizing the continuity of data migration.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the field of cloud computing, and particularly relates to a data migration method and device, a server and a storage medium. BACKGROUND

[0002] With the continuous popularity of cloud computing, application to cloud has become a trend. In the field of cloud computing, Infrastructure as a Service (IaaS) technology has been very mature and has been widely applied in the industry. In some cases, users need more control, more hardware access, higher performance, and the ability to choose their own operating environment.

[0003] In the use process of elastic bare metal servers, server hardware damage is inevitable, and physical machine downtime maintenance period is relatively long, which affects the normal operation of user business. In order to solve the problem that business cannot run due to server damage, the operation and maintenance personnel first create a backup for the system disk and data disk mounted by the elastic bare metal through a block storage management component; then delete the instance, storage and network data corresponding to the source elastic bare metal node, and based on the backup block device, the system of the new elastic bare metal server is issued.

[0004] However, this scheme of selecting a new node for system issuance based on a backup block device recovers quickly, but since the new network resource is bound to the new elastic bare metal server, the data of the original elastic bare metal server cannot be migrated, which causes data mismatch compared with the source elastic bare metal server, and affects the user's business. SUMMARY

[0005] To overcome the problems in the related art, the present disclosure provides a data migration method and device, a server and a storage medium.

[0006] According to a first aspect of an embodiment of the present disclosure, a data migration method is provided, at least comprising:

[0007] When the hardware monitoring index of the source server is greater than or equal to a preset threshold, obtaining the to-be-migrated data of the source server;

[0008] Based on the to-be-migrated data, determining a target server matched with the source server;

[0009] Migrating the to-be-migrated data from the source server to the target server.

[0010] In some embodiments, the to-be-migrated data includes instance data and resource data; and the migrating the to-be-migrated data from the source server to the target server includes:

[0011] deleting the instance data in the source server and updating node data in the target server as the instance data;

[0012] unbinding the resource data bound to the source server and binding the resource data to the target server.

[0013] In some embodiments, the resource data comprises storage data and network data.

[0014] The instance data comprises central processing unit data, memory data, available domain data, specification data, server hardware type data and custom label data.

[0015] In some embodiments, the method further comprises:

[0016] In a case where it is determined that the to-be-migrated data fails to migrate to the target server, unbinding the resource data bound to the target server and re-binding the resource data to the source server;

[0017] deleting node data of the target server and re-binding the instance data to the source server.

[0018] In some embodiments, the method further comprises:

[0019] After binding the resource data to the target server, cutting off communication interaction between the source server and a communication server; the communication server and the source server have established a communication connection;

[0020] In a case where it is determined that the to-be-migrated data successfully migrates to the target server, resuming communication interaction between the source server and the communication server.

[0021] In some embodiments, the determining, based on the to-be-migrated data, a target server matched with the source server comprises:

[0022] According to instance data in the to-be-migrated data, screening, from a server list, an alternative server matched with the instance data;

[0023] Based on the alternative server, determining the target server.

[0024] In some embodiments, the screening, according to instance data in the to-be-migrated data, an alternative server matched with the instance data from a server list comprises:

[0025] According to domain data available in the instance data, a list server in the server list is filtered to obtain a first server;

[0026] According to server hardware type data in the instance data, the first server is filtered to obtain a second server;

[0027] According to custom label data in the instance data, the second server is filtered to obtain a third server;

[0028] According to central processing unit data in the instance data and memory data in the instance data, the third server is filtered to obtain the candidate server.

[0029] In some embodiments, the target server is determined based on the candidate server, including:

[0030] In the case where the candidate server is multiple, the target server is determined based on weight values corresponding to the multiple candidate servers.

[0031] In some embodiments, the source server and the target server are both elastic bare metal servers.

[0032] According to a second aspect of the embodiments of the present disclosure, a data migration device is provided, at least comprising:

[0033] The obtaining module is configured to obtain to-be-migrated data of a source server when a hardware monitoring index of the source server is greater than or equal to a preset threshold value;

[0034] The determining module is configured to determine a target server matched with the source server based on the to-be-migrated data;

[0035] The processing module is configured to migrate the to-be-migrated data from the source server to the target server.

[0036] According to a third aspect of the embodiments of the present disclosure, a server is provided, comprising a processor, a memory, and a program or instruction stored on the memory and running on the processor, the program or instruction being executed by the processor to implement the steps of the data migration method according to the first aspect.

[0037] According to a fourth aspect of the embodiments of the present disclosure, a storage medium is provided, the storage medium storing a program or instruction, the program or instruction being executed to implement the steps of the data migration method according to the first aspect.

[0038] The technical solution provided by the embodiments of the present disclosure can include the following beneficial effects:

[0039] In the embodiments of the present disclosure, the data migration method comprises: when a hardware monitoring index of a source server is greater than or equal to a preset threshold, obtaining to-be-migrated data of the source server; determining a target server matched with the source server based on the to-be-migrated data; and migrating the to-be-migrated data from the source server to the target server. In this way, the target server matched with the source server can be determined through the to-be-migrated data of the source server, so as to ensure the accuracy and consistency of data migration; meanwhile, the nodes of the source server and the target server are kept consistent by migrating the to-be-migrated data from the source server to the target server, so as to ensure the integrity of the to-be-migrated data and realize the continuity of data migration.

[0040] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and are not limiting to the present disclosure. BRIEF DESCRIPTION OF DRAWINGS

[0041] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0042] Figure 1a FIG. 1 is a schematic diagram of a conventional data migration method provided by an embodiment of the present disclosure.

[0043] Figure 1b FIG. 2 is a schematic diagram of a conventional data migration method provided by an embodiment of the present disclosure. Figure Two .

[0044] Figure 2 FIG. 3 is a flowchart of a data migration method provided by an embodiment of the present disclosure.

[0045] Figure 3 FIG. 4 is a flowchart of a data migration method provided by an embodiment of the present disclosure. Figure Two .

[0046] Figure 4 FIG. 5 is a flowchart of a data migration method provided by an embodiment of the present disclosure. Figure Three .

[0047] Figure 5 FIG. 6 is a schematic diagram of a data migration method provided by an embodiment of the present disclosure.

[0048] Figure 6 FIG. 7 is a flowchart of a data migration method provided by an embodiment of the present disclosure. Figure Four .

[0049] Figure 7 FIG. 8 is a flowchart of a data migration method provided by an embodiment of the present disclosure. Figure Five .

[0050] Figure 8 A structural schematic diagram of a data migration device provided by an embodiment of the present disclosure.

[0051] Figure 9 A structural schematic diagram of a server provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0052] The technical solutions of the present disclosure are further described in detail below in combination with the accompanying drawings and specific embodiments. Unless otherwise defined, all technical and scientific terms used herein have the same meanings as commonly understood by those skilled in the art to which the present disclosure belongs. The terms used in the specification of the present disclosure are only for the purpose of describing specific embodiments of the present disclosure and are not intended to limit the present disclosure. The term "and / or" used herein includes any and all combinations of one or more related listed items.

[0053] The terms "first", "second", and the like in the specification and claims of the present disclosure are used to distinguish similar objects, and are not intended to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present disclosure can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of a kind and do not limit the number of objects, for example, the first object can be one or more. In addition, "and / or" in the specification and claims means at least one of the connected objects, and the character " / ", generally indicates that the front and rear associated objects are in an "or" relationship.

[0054] In order to solve the problem that the business cannot run due to server damage, there are mainly two schemes in the prior art to restore the system. One is to repair or replace the hardware through manual operation, as shown in Figure 1a , the process includes problem analysis, hardware procurement, hardware replacement and configuration update, etc. However, this hardware repair has a long cycle and consumes a lot of time. At the same time, the manual operation is needed to repair the server, which has a large difficulty coefficient, and the long-time business interruption will reduce the user experience.

[0055] As shown in Figure 1bAs shown, another is to create a backup by the operation and maintenance personnel for the system disk and data disk mounted by the elastic bare metal server 1 through the block storage management component; then delete the instance, storage and network information corresponding to the elastic bare metal server 1 node, and perform system delivery of the elastic bare metal server 2 based on the backup block device. This scheme of selecting a new node for system delivery based on the backup block device recovers faster, but since the new network resource is bound to the elastic bare metal server 2, the storage data, network data and instance data of the elastic bare metal server 1 cannot be migrated, which causes the data of the elastic bare metal server 1 and the elastic bare metal server 2 to be mismatched, affecting the user's business.

[0056] Based on this, the embodiment of the present disclosure provides a data migration method. Figure 2 A flowchart of a data migration method provided by the embodiment of the present disclosure is shown in FIG. 1. Referring to FIG. 1, Figure 2 The data migration method provided by the embodiment of the present disclosure can include the following steps:

[0057] Step 110, when the hardware monitoring index of a source server is greater than or equal to a preset threshold, obtaining the to-be-migrated data of the source server;

[0058] Step 120, determining a target server matched with the source server based on the to-be-migrated data;

[0059] Step 130, migrating the to-be-migrated data from the source server to the target server.

[0060] In step 110, the above-mentioned source server can be a server that needs to be migrated. The above-mentioned hardware monitoring index can be a parameter representing the hardware state of the above-mentioned source server; wherein the hardware of the server can include: Central Processing Unit (CPU), motherboard, memory, hard disk, network card, Uninterruptible Power Supply (UPS), Redundant Array of Inexpensive Disks (RAID) card and fan, etc., and the above-mentioned hardware monitoring index can represent the state of the server hardware such as CPU and hard disk, etc.

[0061] The preset threshold can be a critical value of the hardware state parameter representing the hardware failure of the source server. For example, the hardware monitoring index of the source server is 80% when the hardware is in a critical state of failure or no failure, that is, the preset threshold is 80%. That is, when the hardware monitoring index of the source server is greater than or equal to 80%, it indicates that the hardware of the source server has failed, and data migration of the source server is required.

[0062] The to-be-migrated data can be data that needs to be migrated from the source server to other servers. For example, the to-be-migrated data can include resource data and instance data in the source server.

[0063] Here, the to-be-migrated data can be obtained from the database of the source server. For example, CPU data, memory data, network data, storage data, specification data, available domain data, server hardware type data, and custom tag data of the source server can be obtained from the database.

[0064] In step 120, the target server can be a server that receives the to-be-migrated data of the source server.

[0065] In the embodiments of the present disclosure, the source server and the target server are both elastic bare metal servers. In this way, data isolation between different servers can be more secure.

[0066] The elastic bare metal server (ECS Bare Metal Server) is a high-performance computing service that can be scaled up and down, and has the same computing performance as a traditional physical machine and the feature of secure physical isolation. The bare metal server is a hardware device that has the characteristics of a traditional physical server and also has the virtualization service function of cloud computing technology. It is a combination of hardware and software advantages. The bare metal server can provide exclusive cloud physical servers for enterprises, and provide excellent computing performance and data security for core databases, critical application systems, high-performance computing, big data, and other businesses, so that cloud service users can flexibly apply and use as needed.

[0067] Here, the target server matching the source server can mean that the node data of the target server is the same as the specification and configuration data of the source node of the source server. Alternatively, the target server can be configured with various to-be-migrated data in the source server, such as resource data or instance data.

[0068] In step 130, the migration operation can include first releasing the relationship between the to-be-migrated data and the source server, and then configuring the to-be-migrated data on the target server.

[0069] The releasing of the relationship between the to-be-migrated data and the source server includes: unbundling the to-be-migrated data from the source server; and / or, deleting the to-be-migrated data in the source server.

[0070] The configuring of the to-be-migrated data on the target server includes: updating the node data in the target server as the instance data; and / or, binding the to-be-migrated data to the target server.

[0071] In the embodiment of the present disclosure, before the to-be-migrated data is migrated from the source server to the target server, the source server needs to be shut down to successfully migrate the to-be-migrated data.

[0072] Here, the process of migrating the to-be-migrated data from the source server to the target server can be called cold migration, also known as static migration. The cold migration refers to that when migrated to another computing node, the server is in a downtime state, that is, the server is shut down for migration; through the cold migration, the associated disk can be selected to be moved from one data storage to another data storage, and the server needs to be restarted to work.

[0073] The data migration method provided by the embodiment of the present disclosure can obtain the to-be-migrated data of the source server when the hardware monitoring index of the source server is greater than or equal to a preset threshold; determine the target server matched with the source server based on the to-be-migrated data; and migrate the to-be-migrated data from the source server to the target server. In this way, the target server matched with the source server can be determined through the to-be-migrated data of the source server, which ensures the accuracy and consistency of data migration; at the same time, the nodes of the source server and the target server are kept consistent by migrating the to-be-migrated data from the source server to the target server, thereby ensuring the integrity of the to-be-migrated data and realizing the continuity of data migration.

[0074] In an embodiment of the present disclosure, the to-be-migrated data can include instance data and resource data; and step 130 can be implemented in various different ways.

[0075] The following is a specific implementation example. It should be noted that the following list is only an example and is not intended to be limiting.

[0076] Figure 3 Flowchart of a data migration method provided by an embodiment of the present disclosure Figure Two . Referring to Figure 3The step 130 in the data migration method provided by the embodiments of the present disclosure can include the following steps:

[0077] The step 131 includes deleting the instance data in the source server and updating the node data in the target server as the instance data.

[0078] The step 132 includes unbinding the resource data bound to the source server and binding the resource data to the target server.

[0079] In the step 131, the instance data can be data corresponding to the most basic computing components such as CPU, memory, operating system and disk in the source server. The node data can be data corresponding to the computing resources such as virtual machine and physical machine connected to the platform in the target server. For example, the node data can include the number of nodes of the target server, the IP address of each node and the usage data.

[0080] Here, the instance data corresponds to the source server, and the instance data corresponding to the target server is different from the instance data of the source server. In the data migration process, the instance data in the source server needs to be directly deleted, and the node data in the target server is updated as the new instance data to complete the data migration.

[0081] For example, the source server can be a source elastic bare metal server, and the target server can be a target elastic bare metal server. The source elastic bare metal server can be powered off first, and then the instance data in the node corresponding to the source elastic bare metal server can be deleted, for example, which can include the universally unique identifier (UUID) of the server instance, the image data used by the server instance and the metadata of the server instance. Then, the node data in the target elastic bare metal server is updated as the node data in the instance data, and the control node data to which the target elastic bare metal server belongs is updated as the compute data in the instance data.

[0082] In the step 132, the resource data can be various data stored after the source server communicates and interacts. For example, the resource data can be network communication data such as the port, protocol, data volume and even content of the communication between the source server and another server obtained by packet capture.

[0083] For example, the source server can be a source elastic bare metal server, and the target server can be a target elastic bare metal server. First, the source elastic bare metal server can be powered off, and then the storage data (for example, a block device) bound to the source elastic bare metal server can be unloaded, and the network data bound to the source elastic bare metal server can be unbound. Then, the storage data and the network data corresponding to the source elastic bare metal server can be bound to the target elastic bare metal server through a control component to which the target elastic bare metal server belongs. The metadata of the source elastic bare metal server can be configured to the target elastic bare metal server.

[0084] In an embodiment of the present disclosure, the resource data can include storage data and network data, and the instance data can include central processing unit data, memory data, available domain data, specification data, server hardware type data, and custom label data.

[0085] Here, the storage data can be data stored in the memory of the source server, and the network data can be data generated through network communication interaction of the source server. The specification data can be data representing the specification information of the source server, for example, the specification data can be length, width, height, and other size data of the source server.

[0086] The data migration method provided by the embodiments of the present disclosure can delete the instance data of the source server, update the node data of the target server to the instance data, and unbind the resource data of the source server and bind it to the target server, thereby ensuring the accuracy and consistency of the to-be-migrated data migrated to the target server, ensuring the integrity of the to-be-migrated data, and realizing the continuity of data migration.

[0087] In an embodiment, the data migration method can further include:

[0088] In a case where it is determined that the to-be-migrated data fails to be migrated to the target server, the resource data bound to the target server is unbound, and the resource data is re-bound to the source server.

[0089] The node data of the target server is deleted, and the instance data is re-bound to the source server.

[0090] In this way, in a case where data migration fails, the to-be-migrated data can be rolled back to the source server, and the to-be-migrated data of the source server is protected, so that the to-be-migrated data of the source server is not lost.

[0091] Here, the operation of re-binding the resource data and the instance data to the source server can be referred to as rollback; rollback refers to the behavior of restoring a program or data to the last correct state in the case of a program or data processing error.

[0092] For example, the source server can be a source elastic bare metal server, and the target server can be a target elastic bare metal server; in the case of a data migration failure, the nodes of the target elastic bare metal server can be operated, and then the storage data, network data, instance data, etc. are rolled back to the nodes of the source elastic bare metal server.

[0093] In the embodiments of the present disclosure, whether the migration of the to-be-migrated data to the target server is successful can be determined by powering on the target server; that is, by starting the target server, since the target server cannot run normally, it is determined that the migration of the to-be-migrated data to the target server fails.

[0094] In an embodiment, the data migration method can further include:

[0095] After the resource data is bound to the target server, the communication interaction between the source server and the communication server is cut off; the communication connection is established between the communication server and the source server;

[0096] In the case where it is determined that the migration of the to-be-migrated data to the target server is successful, the communication interaction between the source server and the communication server is restored.

[0097] In this way, during the data migration process, the communication interaction of the source server can be cut off to prevent the source server from communicating with the communication server during the data migration process, thereby preventing the to-be-migrated data from being rolled back to the source server after the data migration fails.

[0098] The communication server can be any one server other than the source server and the target server and having a communication connection with the source server.

[0099] Here, the communication interaction between the source server and the communication server can be cut off by setting the source server to a maintenance state or a do-not-disturb state.

[0100] In the embodiments of the present disclosure, whether the migration of the to-be-migrated data to the target server is successful can be determined by powering on the target server, that is, starting the target server, since the target server can run normally, it is determined that the migration of the to-be-migrated data to the target server is successful, so as to restore the communication interaction between the source server and the communication server.

[0101] In an embodiment of the present disclosure, step 120 can be implemented in various different ways.

[0102] A specific implementation example is given below. It should be noted that the following list is only an example and is not intended to be limiting.

[0103] Figure 4 Flowchart of a data migration method provided by an embodiment of the present disclosure Figure Three . Referring to Figure 4 The step 120 in the data migration method provided by the embodiment of the present disclosure can include the following steps:

[0104] Step 120a: filtering, according to instance data in the data to be migrated, a candidate server matching the instance data from a server list;

[0105] Step 120b: determining the target server based on the candidate server.

[0106] In step 120a, the server list can be servers available for data migration by the source server in the database. The candidate server can be a server in the server list that can match the instance information.

[0107] In the embodiment of the present disclosure, the candidate server matching each different data in the instance data can be filtered, so that the target server capable of data migration can be determined based on the candidate server subsequently.

[0108] It should be understood that the number of the server list and the candidate server can be selected according to actual application, and the embodiment of the present disclosure is not limited. For example, the number of servers in the server list can be multiple; the number of the candidate server can be one or more.

[0109] In step 120b, since the number of the candidate server can be one or more, the process of determining the target server based on the candidate server can have two cases. For example, in the case of one candidate server, the candidate server can be directly used as the target server.

[0110] In an embodiment of the present disclosure, the specific process of determining the target server based on the candidate server in step 120b can include:

[0111] In the case of multiple candidate servers, the target server is determined based on the weight values corresponding to the multiple candidate servers.

[0112] Thus, by calculating the weight values corresponding to the plurality of candidate servers to determine the target server, the matching degree of the target server and the source server can be improved, so that the to-be-migrated data can be better migrated to the target server.

[0113] The determining of the target server based on the weight values corresponding to the plurality of candidate servers can include: comparing the weight values corresponding to the plurality of candidate servers; and taking the candidate server with the largest weight value as the target server.

[0114] Here, different percentages can be set according to different data in the above example data, and the weight values corresponding to the candidate servers can be calculated according to the percentages of different data.

[0115] For example, the above example data can include central processor data, memory data, available domain data, server hardware type data, and custom tag data; the percentages of the central processor data and the memory data can be set to 40%, the percentage of the available domain data can be set to 20%, the percentage of the server hardware type data can be set to 20%, and the percentage of the custom tag data can be set to 20%, so as to calculate the weight values of different candidate servers matched with different example data, and thus the candidate server with a larger weight value can be taken as the target server.

[0116] The data migration method provided by the embodiments of the present disclosure can filter out the candidate servers matched with the example data from the server list through the example data in the to-be-migrated data, and determine the target server based on the candidate servers, so as to improve the matching degree of the target server and the source server, and thus better migrate the to-be-migrated data to the target server.

[0117] In an embodiment of the present disclosure, step 120a can be implemented in various different ways.

[0118] A specific implementation example is given below. It should be noted that the following list is only an example and is not intended to be limiting.

[0119] Figure 6 Flowchart of a data migration method provided by an embodiment of the present disclosure Figure Four . Referring to Figure 6 , step 120a in the data migration method provided by the embodiments of the present disclosure can include the following steps:

[0120] Step 121: filtering the list servers in the server list according to the available domain data in the example data to obtain first servers;

[0121] Step 122: filtering the first servers according to the server hardware type data in the example data to obtain second servers;

[0122] Step 123, screening the second server according to the custom label data in the instance data to obtain a third server;

[0123] Step 124, screening the third server according to the central processor data in the instance data and the memory data in the instance data to obtain the candidate server.

[0124] In step 121, the available domain data can be domain name data available to the source server; the list server can be a server in the database available for data migration of the source server; and the first server can be a server in the list server having the same data as the available domain data.

[0125] In the embodiments of the present disclosure, the list server in the server list can be first screened according to the available domain data of the source server, and a server under the same available domain as the source server, i.e., the first server, is filtered out, and list servers under other available domains are excluded.

[0126] In step 122, the server hardware type data can be data representing the hardware type of the source server; and the second server can be a server in the first server having the same data as the server hardware type data.

[0127] In the embodiments of the present disclosure, the first server after screening can be second screened according to the server hardware type data of the source server, and a server of the same hardware type as the source server, i.e., the second server, is screened out, and first servers of other types are excluded.

[0128] In step 123, the custom label data can be various label data defined in the source server for distinguishing different functions or roles; and the third server can be a server in the second server having the same data as the custom label data.

[0129] In the embodiments of the present disclosure, the second server can be third screened according to the custom label data of the source server, and a server consistent with the custom label of the source server, i.e., the third server, is screened out, and second servers of other different custom labels are excluded.

[0130] In step 124, the central processor data can be data such as CPU size or model of the source server; the memory data can be data such as memory size of the source server; and the candidate server can be a server in the third server having the same data as the central processor data and the memory data.

[0131] In the embodiments of the present disclosure, the third server can be screened for the fourth time according to the CPU size and the memory size of the source server, and servers with consistent CPU and memory size with the source server, i.e., the alternative servers, are screened out, and the third servers with different CPU and memory are excluded.

[0132] The data migration method provided by the embodiments of the present disclosure can screen the list servers in the server list for four times according to the available domain data, the server hardware type data, the custom label data, the central processing unit data and the memory data in the instance data, so as to obtain the alternative servers matched with the instance data, so that the matching degree of the target server determined subsequently with the source server is higher, thereby better migrating the to-be-migrated data to the target server.

[0133] Figure 5 A schematic diagram of a data migration method provided by the embodiments of the present disclosure; Figure 7 A flowchart of a data migration method provided by the embodiments of the present disclosure Figure Five In combination with Figure 5 and Figure 7 , the data migration method provided by the embodiments of the present disclosure is only an example and is not limited, and the purpose is to facilitate those skilled in the art to better understand the technical solutions of the present disclosure. Referring to Figure 7 , the data migration method provided by the embodiments of the present disclosure can include:

[0134] Step 701, when the hardware monitoring index of a source server is greater than or equal to a preset threshold, obtaining to-be-migrated data of the source server; the to-be-migrated data includes instance data and resource data;

[0135] Step 702, screening a list server in a server list according to available domain data in the instance data, to obtain a first server;

[0136] Step 703, screening the first server according to server hardware type data in the instance data, to obtain a second server;

[0137] Step 704, screening the second server according to custom label data in the instance data, to obtain a third server;

[0138] Step 705, screening the third server according to central processing unit data in the instance data and memory data in the instance data, to obtain an alternative server;

[0139] Step 706, in the case that the alternative server is one, taking the alternative server as a target server matched with the source server

[0140] Step 707, in the case of multiple alternative servers, determining the target server matching the source server based on the weight values corresponding to the multiple alternative servers;

[0141] Step 708, deleting the instance data in the source server and updating the node data in the target server as the instance data;

[0142] Step 709, unbinding the resource data bound to the source server and binding the resource data to the target server;

[0143] Step 710, cutting off the communication interaction between the source server and the communication server; the communication server and the source server have a communication connection established therebetween;

[0144] Step 711, in the case of determining that the migration of the to-be-migrated data to the target server is successful, resuming the communication interaction between the source server and the communication server;

[0145] Step 712, in the case of determining that the migration of the to-be-migrated data to the target server fails, unbinding the resource data bound to the target server and re-binding the resource data to the source server; deleting the node data of the target server and re-binding the instance data to the source server.

[0146] It should be noted that step 706 and step 707 are two parallel schemes; step 711 and step 712 are also two parallel schemes. That is, one of the schemes in these steps can be selected for execution according to actual application conditions.

[0147] Referring to Figure 5 and Figure 7In an embodiment of the present disclosure, the information collection unit can obtain the to-be-migrated data of the source server from the database before the data cold migration, such as storage data, network data, CPU data, memory data, available domain data, specification data, server hardware type data, and custom tag data; and obtain the scheduling data and the server list available for data migration from the database during the data cold migration. The scheduling unit can schedule and filter the server list based on the CPU data, memory data, available domain data, specification data, server hardware type data, and custom tag data of the source server during the data cold migration, and filter out the target server that meets the migration condition. Then, the cold migration unit can unbind the network data and storage data of the source server, delete the instance data on the source server, set the source server to a maintenance state to prevent the source server from being occupied by other communication servers during the data migration, and cause the to-be-migrated data to be unable to be rolled back; bind the network data and storage data of the source server to the target server, update the instance data to the node data of the target server, and initialize the node of the target server; release the maintenance state of the source server after the data migration is successful, so that the source server can communicate and interact with other communication servers. Finally, the rollback unit can unbind the network data, storage data, and instance data that have been bound to the target server, and bind them to the source server again after the data cold migration of the source server fails.

[0148] The data migration method provided by the embodiment of the present disclosure can determine the target server matched with the source server through the to-be-migrated data of the source server, and ensure the accuracy and consistency of data migration. Meanwhile, the instance data of the source server is deleted, the node data of the target server is updated to the instance data, and the resource data of the source server is unbound and bound to the target server, so that the nodes of the source server and the target server are consistent, thereby ensuring the integrity of the to-be-migrated data and realizing the continuity of data migration. In addition, the communication interaction of the source server is cut off to prevent the source server from communicating and interacting with the communication server during the data migration, thereby preventing the to-be-migrated data from being unable to be rolled back to the source server after the data migration fails.

[0149] Figure 8 FIG. 1 is a structural schematic diagram of a data migration device provided by an embodiment of the present disclosure. As shown in FIG. 1, the data migration device 800 can include an obtaining module 810, a determining module 820, and a processing module 830. Figure 8 The data migration device 800 provided by the embodiment of the present disclosure can include an obtaining module 810, a determining module 820, and a processing module 830.

[0150] The obtaining module 810 is configured to obtain the to-be-migrated data of the source server when the hardware monitoring index of the source server is greater than or equal to a preset threshold.

[0151] determining module 820 is configured to determine a target server matched with the source server based on the to-be-migrated data.

[0152] processing module 830 is configured to migrate the to-be-migrated data from the source server to the target server.

[0153] The data migration apparatus provided by the embodiments of the present disclosure can obtain to-be-migrated data of a source server when a hardware monitoring index of the source server is greater than or equal to a preset threshold, determine a target server matched with the source server based on the to-be-migrated data, and migrate the to-be-migrated data from the source server to the target server. In this way, the target server matched with the source server can be determined based on the to-be-migrated data of the source server, so that the accuracy and consistency of data migration are ensured. Meanwhile, the nodes of the source server and the target server are kept consistent by migrating the to-be-migrated data from the source server to the target server, so that the integrity of the to-be-migrated data is ensured, and the continuity of data migration is achieved.

[0154] For the technical solution shown in FIG. 8, in a possible implementation manner, the to-be-migrated data includes instance data and resource data; and the processing module 830 can specifically be configured to delete the instance data in the source server, and update node data in the target server to the instance data; unbind the resource data bound to the source server, and bind the resource data to the target server. Figure 8 For the technical solution shown in FIG. 8, in a possible implementation manner, the to-be-migrated data includes instance data and resource data; and the processing module 830 can specifically be configured to delete the instance data in the source server, and update node data in the target server to the instance data; unbind the resource data bound to the source server, and bind the resource data to the target server.

[0155] For the technical solution shown in FIG. 8, in a possible implementation manner, the resource data includes storage data and network data; and the instance data includes central processing unit data, memory data, available domain data, specification data, server hardware type data, and custom label data. Figure 8 For the technical solution shown in FIG. 8, in a possible implementation manner, the resource data includes storage data and network data; and the instance data includes central processing unit data, memory data, available domain data, specification data, server hardware type data, and custom label data.

[0156] Figure 8 For the technical solution shown in FIG. 8, in a possible implementation manner, the processing module 830 can further be configured to, in a case where the to-be-migrated data fails to be migrated to the target server, unbind the resource data bound to the target server, and rebind the resource data to the source server; delete node data of the target server, and rebind the instance data to the source server.

[0157] For the technical solution shown in FIG. 8, in a possible implementation manner, the processing module 830 can further be configured to, in a case where the to-be-migrated data fails to be migrated to the target server, unbind the resource data bound to the target server, and rebind the resource data to the source server; delete node data of the target server, and rebind the instance data to the source server. Figure 8 ​In a possible implementation process of the technical solution, the processing module 830 can be further configured to: after binding the resource data to the target server, cut off the communication interaction between the source server and the communication server; the communication server and the source server are connected through a communication connection; and in a case where it is determined that the migration of the to-be-migrated data to the target server is successful, restore the communication interaction between the source server and the communication server.

[0158] For Figure 8 In a possible implementation process of the technical solution, the determining module 820 can be specifically configured to: according to instance data in the to-be-migrated data, filter out a candidate server matching the instance data from a server list; and determine the target server based on the candidate server.

[0159] For Figure 8 In a possible implementation process of the technical solution, the determining module 820 can be specifically configured to: according to available domain data in the instance data, filter a list server in the server list to obtain a first server; according to server hardware type data in the instance data, filter the first server to obtain a second server; according to custom label data in the instance data, filter the second server to obtain a third server; and according to central processing unit data in the instance data and memory data in the instance data, filter the third server to obtain the candidate server.

[0160] For Figure 8 In a possible implementation process of the technical solution, the determining module 820 can be specifically configured to: in a case where the candidate server is multiple, determine the target server based on weight values corresponding to the multiple candidate servers.

[0161] For Figure 9 In a possible implementation process of the technical solution, the source server and the target server are both elastic bare metal servers.

[0162] It should be noted that the data migration apparatus provided by the embodiments of the present disclosure corresponds to the data migration method mentioned above. For related content, refer to the description of the data migration method above, which will not be repeated here.

[0163] Figure 9 A structural diagram of a server provided by the embodiments of the present disclosure is shown in FIG. 9. ​ The server 900 provided by the embodiments of the present disclosure can include a processor 901, a communication interface 902, and a memory 903.

[0164] The processor 901 generally controls the overall operation of the router.

[0165] The communication interface 902 enables the server to communicate with other terminals or servers through a network.

[0166] The memory 903 is configured to store instructions and applications executable by the processor 901, and can also cache data to be processed by the processor 901 and modules in the router, and can be implemented by a flash memory (FLASH) or a random access memory (RAM).

[0167] A storage medium, when the instructions in the storage medium are executed by the processor of the server, enable the server to perform a data migration method, the method comprising: when a hardware monitoring index of a source server is greater than or equal to a preset threshold, obtaining to-be-migrated data of the source server; based on the to-be-migrated data, determining a target server matched with the source server; migrating the to-be-migrated data from the source server to the target server. In this way, the target server matched with the source server can be determined through the to-be-migrated data of the source server, ensuring the accuracy and consistency of data migration; at the same time, by migrating the to-be-migrated data from the source server to the target server, the nodes of the source server and the target server are kept consistent, thereby ensuring the integrity of the to-be-migrated data and realizing the continuity of data migration.

[0168] Those skilled in the art will understand that the embodiments of the present disclosure can be provided as a method, a system, or a computer program product. Therefore, the present disclosure can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present disclosure can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage, etc.) containing computer-usable program code.

[0169] The present disclosure is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present disclosure. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and combinations of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing apparatus produce the functions specified in one or more flows in the flowcharts and / or one or more blocks in the block diagrams.

[0170] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart or flowsheets and / or block or blocks of the block diagrams.

[0171] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart or flowsheets and / or block or blocks of the block diagrams.

[0172] In one typical configuration, the computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0173] The memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) about which the processor can execute instructions. The memory can also include non-volatile memory, such as read only memory (ROM), electrically programmable read only memory (EPROM), electrically erasable programmable read only memory (EEPROM), flash memory, or other memory technologies, about which the processor can execute instructions. The memory is an example of computer storage media.

[0174] Computer storage media includes permanent and non-permanent, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), electrically programmable read only memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital versatile disc (DVD), or other optical storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to computing devices. According to the definition herein, computer storage media does not include transitory media, such as modulated data signals and carrier waves.

[0175] It is also to be noticed that the term "comprising" or "including" or any other variation thereof, is intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises a... " does not, without more constraints, exclude the presence of additional identical elements in the process, method, article, or apparatus that comprises the element.

[0176] Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. It is intended that the specification and examples be considered as exemplary only, with the true scope and spirit of the disclosure being indicated by the following claims.

[0177] It is to be understood that the disclosure is not limited to the precise construction described above and shown in the attached drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the disclosure is limited only by the claims appended hereto.

Claims

1. A data migration method, characterized in that, include: When the hardware monitoring index of the source server is greater than or equal to a preset threshold, the data to be migrated from the source server is obtained. Based on the data to be migrated, a target server matching the source server is determined; Migrate the data to be migrated from the source server to the target server; The step of determining the target server matching the source server based on the data to be migrated includes: filtering candidate servers that match the instance data from a server list based on the instance data in the data to be migrated; and determining the target server based on the candidate servers. The step of selecting candidate servers that match the instance data from the server list based on the instance data in the migration data includes: filtering the list servers in the server list based on the available domain data in the instance data to obtain a first server; filtering the first server based on the server hardware type data in the instance data to obtain a second server; filtering the second server based on the custom tag data in the instance data to obtain a third server; and filtering the third server based on the central processing unit data and the memory data in the instance data to obtain the candidate servers.

2. The method according to claim 1, characterized in that, The data to be migrated also includes resource data; the migration of the data to be migrated from the source server to the target server includes: Delete the instance data in the source server and update the node data in the target server to the instance data; The resource data bound to the source server is unbound, and the resource data is then bound to the target server.

3. The method according to claim 2, characterized in that, The resource data includes: stored data and network data; The instance data includes: central processing unit data, memory data, availability domain data, specification data, server hardware type data, and custom tag data.

4. The method according to claim 2, characterized in that, The method further includes: If it is determined that the migration of the data to be migrated to the target server has failed, the resource data bound to the target server will be unbound, and the resource data will be rebound to the source server. Delete the node data of the target server and rebind the instance data to the source server.

5. The method according to claim 2, characterized in that, The method further includes: After binding the resource data to the target server, the communication interaction between the source server and the communication server is cut off; a communication connection is established between the communication server and the source server. If the migration of the data to be migrated to the target server is successful, the communication between the source server and the communication server is restored.

6. The method according to claim 1, characterized in that, The step of determining the target server based on the candidate servers includes: When there are multiple candidate servers, the target server is determined based on the weight values ​​corresponding to the multiple candidate servers.

7. The method according to any one of claims 1 to 6, characterized in that, Both the source server and the target server are elastic bare metal servers.

8. A data migration device, characterized in that, include: The acquisition module is used to acquire the data to be migrated from the source server when the hardware monitoring index of the source server is greater than or equal to a preset threshold. The determination module is used to determine a target server that matches the source server based on the data to be migrated; A processing module is used to migrate the data to be migrated from the source server to the target server; The determining module is further configured to filter out candidate servers that match the instance data from the server list based on the instance data in the data to be migrated; and to determine the target server based on the candidate servers. The step of selecting candidate servers that match the instance data from the server list based on the instance data in the migration data includes: filtering the list servers in the server list based on the available domain data in the instance data to obtain a first server; filtering the first server based on the server hardware type data in the instance data to obtain a second server; filtering the second server based on the custom tag data in the instance data to obtain a third server; and filtering the third server based on the central processing unit data and the memory data in the instance data to obtain the candidate servers.

9. A server, characterized in that, It includes a processor, a memory, and a program or instructions stored in the memory and running on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the data migration method as described in any one of claims 1 to 7.

10. A storage medium, characterized in that, The storage medium stores a program or instructions, which, when executed, perform the steps of the data migration method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Application cluster migrating method and migrating device based on service model

    CN106603592A

  • Database migration method and device

    CN110737717A