Data migration method and equipment

By obtaining cut-in instructions and incremental information during business operation, the purpose host can perform incremental migration while the business is running, solving the problem of long business stagnation in the existing technology and achieving more efficient data migration.

CN120104042APending Publication Date: 2025-06-06HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410381669.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-12-05
Filing Date
2024-03-29
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

The existing data migration method needs to stop the business operation during incremental migration and during cutting the business, resulting in the business stagnation for too long and affecting the use of the business.

Method used

By obtaining cut-in instructions during business operation, the destination host can run the target service and obtain incremental information and data blocks from the source host to realize incremental migration. The destination host decides to read data from the source host or destination host based on incremental information to avoid duplicate migration and data overwrite.

Benefits of technology

Incremental migration is realized while the business is running, shortening the business stagnation time and reducing the impact of data migration on the business.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120104042A_ABST
    Figure CN120104042A_ABST
Patent Text Reader

Abstract

The invention discloses a data migration method and equipment, relates to the technical field of IT (information technology), and can perform incremental migration in a service running process so as to shorten service dead time. According to the specific scheme, a destination host can receive and store stock data from a source host. Afterwards, the target host can obtain a cutover instruction, the cutover instruction is used for indicating the operation of a target service, and the target service is a service operated in the source host. Afterwards, in response to the cutover instruction, the target host can run the target service. Then, the target host can obtain incremental information from the source host, the incremental information is used for indicating at least one incremental data block, and the incremental data block is a data block with data changed after the data in the data block is migrated to the target host; and then, the destination host can obtain data in each incremental data block from the source host according to the incremental information, and store the data in the incremental data blocks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of IT technology, and in particular to a method and device for data migration. Background Art

[0002] With the continuous development of computer technology, the business needs of users or enterprises are getting higher and higher, and new servers are needed to meet business needs. When using a new server, users need to migrate the data in the current server (which can be called the source host) to the new server (destination host). For example, users can move the server to the cloud and migrate their data to the cloud server. Users can access their data anytime and anywhere through the Internet.

[0003] Currently, when migrating data from a source host to a destination host, the migration of data needs to be completed through four steps: full migration, stopping the service (i.e. the source host stops serving the service), incremental migration, and cutover of the service (the destination host serves the service). However, during the above data migration process, the service needs to be stopped during the incremental migration process and the cutover of the service. This will cause the service to stagnate for too long, affecting the use of the service. Summary of the invention

[0004] The present application provides a method and device for data migration, which can perform incremental migration during business operation, thereby shortening business stagnation time.

[0005] In a first aspect, the present application provides a method for data migration, which can be applied to a destination host. The destination host can obtain a cutover instruction, which is used to instruct the operation of a target service, where the target service is a service running on a source host. Afterwards, in response to the cutover instruction, the destination host can operate the target service. After operating the target service, the destination host can obtain incremental information from the source host, where the incremental information is used to indicate at least one incremental data block, where the incremental data block is a data block in which the data has changed after the data in the data block has been migrated to the destination host. Then, the destination host can obtain the data in each incremental data block from the source host based on the incremental information, and store the data in the incremental data block.

[0006] Based on the above technical solution, the destination host can obtain the cutover instruction and run the target service. After running the target service, the destination host can obtain the incremental information, which is used to indicate the data blocks whose data have changed after the data in the data blocks have been migrated to the destination host. Afterwards, the destination host can obtain the data in each incremental data block from the source host according to the incremental information, and store the data in the incremental data block. In this way, the destination host can run the service at the same time when performing incremental migration, shortening the service stagnation time and reducing the impact of data migration on the service.

[0007] In combination with the first aspect, in a possible design, the incremental information includes: migration information of each incremental data block, the migration information is first information or second information, the first information is used to indicate that the data in the incremental data block has not been migrated to the destination host, and the second information is used to indicate that the data in the incremental data block has been migrated to the destination host. The method also includes: the destination host updates the migration information corresponding to the incremental data block that has been migrated to the destination host to the second information.

[0008] That is to say, during incremental migration, the destination host can update the migration information of the incremental data blocks in real time, thus avoiding repeated migration of data blocks and improving data migration efficiency.

[0009] In combination with the first aspect, in another possible design, the method further includes: the destination host can obtain a service request, and the service request is used to indicate reading and writing data. If the service request is used to indicate reading data, the destination host determines to read data from the destination host or the source host based on the current incremental information. If the service request is used to indicate writing data in a first data block, the destination host determines to write data in a second data block based on the current incremental information, and the second data block is different from the first data block, or the second data block is the same as the first data block, and the second data block is a data block in the destination host except that the migration information is the first information.

[0010] That is to say, the destination host can read data from the source host or the destination host according to the incremental information. In this way, it can ensure that the data read is the latest data, and improve the accuracy of the read data. In addition, the destination host can write the data into the specified data block or other data blocks according to the incremental information. In this way, it can avoid overwriting the newly written data during data migration, and ensure the integrity of the data.

[0011] In combination with the first aspect, in another possible design, the method further includes: if the migration information of the third data block in the current incremental information is the first information, the destination host reads the data in the third data block from the source host, and the third data block is the data block indicated to be read by the service request. If the migration information of the third data block in the current incremental information is the second information, the destination host reads the data in the third data block from the destination host.

[0012] That is to say, if the third data block has not been incrementally synchronized, it means that the data in the third data block in the destination host may be inaccurate. Therefore, the third data block can be read from the source host to ensure the accuracy of the data. If the third data block has been incrementally synchronized, it means that the data in the third data block in the destination host is the latest data. Therefore, the data in the third data block can be read from the destination host to improve the efficiency of reading data.

[0013] In combination with the first aspect, in another possible design, the method further includes: the destination host stores data in the third data block read from the source host, and updates the migration information of the third data block to the second information.

[0014] That is to say, after reading the data, the destination host can directly store the read data without the need to incrementally synchronize the third data block again, thereby improving the efficiency of data migration.

[0015] In combination with the first aspect, in another possible design, if the migration information of the first data block in the current incremental information is the first information, the second data block is different from the first data block, and the second data block is a data block in the destination host other than the data block whose migration information is the first information. If the migration information of the first data block in the current incremental information is the second information, the second data block is the same as the first data block.

[0016] That is to say, if the first data block has not been incrementally synchronized, the data needs to be written into another data block that does not need incremental synchronization. In this way, the newly written data can be avoided from being overwritten during data migration, thus ensuring the integrity of the data. If the first data block has been incrementally synchronized, the data can be directly written into the first data block.

[0017] In combination with the first aspect, in another possible design, the method may further include: the destination host starts a target driver, and the target driver is used to read and write data. After that, the destination host performs read and write operations on the target service through the target driver. Moreover, the destination host may write the data in each incremental data block read from the source host to the destination host through the target driver.

[0018] That is to say, while the destination host is running services, data can be read from the source host for incremental migration, thus shortening service stagnation time.

[0019] In combination with the first aspect, in another possible design, the method may further include: receiving and storing stock data from a source host, the stock data including: a target driver. Alternatively, the destination host is deployed with a target driver.

[0020] In combination with the first aspect, in another possible design, the method may further include: the destination host starts a migration application, the migration application is used to trigger the migration of data from the source host to the destination host. The destination host obtains data in each incremental data block from the source host according to the incremental information through the migration application.

[0021] In combination with the first aspect, in another possible design, the existing data also includes: a migration application; or, the destination host is deployed with a migration application.

[0022] In combination with the first aspect, in another possible design, the method may further include: when the data migration in each incremental data block is completed, the destination host uninstalls the destination driver and / or migration application.

[0023] It is understandable that when the data migration in each incremental data block is completed, it means that the incremental synchronization has been completed, that is, the data migration process has been completed. Therefore, the destination driver and / or migration application can be uninstalled to save storage resources of the destination host.

[0024] In combination with the first aspect, in another possible design, the method may further include: the destination host may receive the stock data from the source host through a proxy object, and the proxy object is preset with a first operating system.

[0025] In this way, the destination host can migrate data based on the first operating system in the proxy object, thereby ensuring that the data can be migrated normally.

[0026] In combination with the first aspect, in another possible design, the proxy object is a proxy image deployed on the destination host, or the proxy object is a proxy server.

[0027] In combination with the first aspect, in another possible design, the stock data also includes: a second operating system of the source host. The method may also include: when the stock data migration is completed, the destination host may uninstall the proxy image and restart the second operating system in the destination host.

[0028] That is to say, during incremental migration, the destination host no longer uses the operating system in the proxy image, but uses the operating system in the destination host, thereby ensuring the migration of incremental data.

[0029] In a second aspect, the present application provides a method for data migration, which can be a source host. The source host can obtain a migration instruction, and the migration instruction is used to instruct the migration of data in each data block in the source host to the destination host. Afterwards, in response to the migration instruction, the source host can send the existing data to the destination host. Then, the source host can generate incremental information, and the incremental information is used to indicate at least one incremental data block, and the incremental data block is a data block in which the data in the data block has changed after the data in the data block has been migrated to the destination host. Afterwards, the source host can obtain a business stop instruction when the migration of the existing data is completed, and stop running the target business in response to the business stop instruction. Then, the source host can receive an incremental synchronization request from the destination host, and the incremental synchronization request is used to request to obtain the data in the incremental data block. Then, the source host can send the data in the incremental data block to the destination host.

[0030] Based on the above technical solution, the source host can generate incremental information during the migration of stock data. Afterwards, when the migration of stock data is completed, the source host can stop the operation of the target business. Then, the source host can receive an incremental synchronization request from the destination host, so that the source host sends the data in the incremental data block to the destination host. In this way, the destination host can actively obtain incremental data from the source host, thereby ensuring that the destination host can perform incremental synchronization while running the business, thereby shortening the business stagnation time.

[0031] In combination with the first aspect, in a possible design, the stock data includes: a target drive and / or incremental information, and the target drive is used to read and write data.

[0032] In a third aspect, the present application provides a method for data migration. In the method, a source host obtains a migration instruction, and the migration instruction is used to instruct the migration of data in each data block in the source host to the destination host. In response to the migration instruction, the source host sends the existing data to the destination host. The destination host receives and stores the existing data from the source host. The source host generates incremental information, and the incremental information is used to indicate at least one incremental data block, and the incremental data block is a data block in which the data in the data block has changed after the data in the data block has been migrated to the destination host. When the migration of the existing data is completed, the source host obtains a service stop instruction, and in response to the service stop instruction, the source host stops running the target service. The destination host obtains a cutover instruction, and the cutover instruction is used to instruct the running of the target service. In response to the cutover instruction, the destination host runs the target service. After running the target service, the destination host obtains incremental information from the source host. The destination host obtains the data in each incremental data block from the source host according to the incremental information, and stores the data in the incremental data block.

[0033] Based on the above technical solution, the destination host can obtain and store the existing data from the source host to complete the full migration of data. When the migration of existing data is completed, the source host can stop running the target business. Afterwards, the destination host can obtain the cutover instruction and run the target business. In addition, the source host can generate incremental information and transmit the incremental information to the destination host. The incremental information is used to indicate the data blocks in which the data has changed after the data in the data blocks has been migrated to the destination host. Afterwards, the destination host can obtain the data in each incremental data block from the source host based on the incremental information, and store the data in the incremental data block. In this way, the destination host can run the business at the same time when performing incremental migration, shortening the business stagnation time and reducing the impact of data migration on the business.

[0034] In a fourth aspect, the present application provides a data migration system, the system comprising: a source host, for obtaining a migration instruction, the migration instruction is used to instruct the migration of data in each data block in the source host to the destination host. The source host is also used to send the stock data to the destination host in response to the migration instruction. The destination host is used to receive and store the stock data from the source host. The source host is also used to generate incremental information, the incremental information is used to indicate at least one incremental data block, and the incremental data block is a data block in which the data in the data block has changed after the data in the data block has been migrated to the destination host. The source host is also used to obtain a service stop instruction when the migration of the stock data is completed, and in response to the service stop instruction, the source host stops running the target service. The destination host is also used to obtain a cutover instruction, the cutover instruction is used to instruct the running of the target service. The destination host is also used to run the target service in response to the cutover instruction. The destination host is also used to obtain incremental information from the source host after running the target service. The destination host is also used to obtain the data in each incremental data block from the source host according to the incremental information, and store the data in the incremental data block.

[0035] In a fifth aspect, the present application provides a computing device cluster, the computing device cluster comprising at least one computing device, each computing device comprising a processor and a memory. The processor of at least one computing device is used to execute instructions stored in the memory of at least one computing device, so that the computing device cluster executes the method described in the first aspect, the second aspect, the third aspect and any possible design thereof.

[0036] In a sixth aspect, the present application provides a chip system, which is applied to a computing device cluster. The chip system includes one or more interface circuits and one or more processors. The interface circuit and the processor are interconnected by a line. The interface circuit is used to receive a signal from a memory of the computing device cluster and send the signal to the processor, where the signal includes a computer instruction stored in the memory. When the processor executes the computer instruction, the computing device cluster executes the method described in the first aspect and any possible design thereof.

[0037] In the seventh aspect, the present application provides a computer-readable storage medium, which includes computer instructions. When the computer instructions are executed on a computing device cluster, the computing device cluster executes the method described in the first aspect, the second aspect, the third aspect and any possible design method thereof.

[0038] In an eighth aspect, the present application provides a computer program product, which, when executed on a computer, enables the computer to execute the method described in the first aspect, the second aspect, the third aspect, and any possible design thereof.

[0039] It can be understood that the beneficial effects that can be achieved by the computing device cluster described in the fifth aspect and any possible design method provided above, the chip system described in the sixth aspect, the computer-readable storage medium described in the seventh aspect, and the computer program product described in the eighth aspect can be referred to as the beneficial effects in the first aspect and any possible design method thereof, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 A schematic diagram of a data migration scenario provided in an embodiment of the present application;

[0041] Figure 2 A schematic diagram of an example of data block migration provided in an embodiment of the present application;

[0042] Figure 3 A schematic diagram of a data migration system provided in an embodiment of the present application;

[0043] Figure 4 A flow chart of a method for data migration provided in an embodiment of the present application;

[0044] Figure 5 A schematic diagram of another example of data block migration provided in an embodiment of the present application;

[0045] Figure 6 A schematic diagram of an example of a business operation provided in an embodiment of the present application;

[0046] Figure 7 A schematic diagram of another example of business operation provided in an embodiment of the present application;

[0047] Figure 8 A schematic diagram of an example of stock migration provided in an embodiment of the present application;

[0048] Fig. 9 A schematic diagram of an example of incremental migration provided in an embodiment of the present application;

[0049] Fig.10 A schematic diagram of another example of stock migration provided in an embodiment of the present application;

[0050] Fig.11 A schematic diagram of another example of incremental migration provided in an embodiment of the present application;

[0051] Fig.12 A flowchart of another method for data migration provided in an embodiment of the present application;

[0052] Fig.13 A schematic diagram of the composition of a data migration device provided in an embodiment of the present application;

[0053] Fig.14A schematic diagram of the composition of a data migration device provided in an embodiment of the present application;

[0054] Fig.15 A schematic diagram of the structure of a computing device provided in an embodiment of the present application;

[0055] Fig.16 A schematic diagram of the structure of a computing device cluster provided in an embodiment of the present application;

[0056] Fig.17 A schematic diagram of the structural composition of a computing device cluster provided in an embodiment of the present application. DETAILED DESCRIPTION

[0057] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0058] In this application, the character " / " generally indicates that the objects before and after are in an "or" relationship. For example, A / B can be understood as A or B.

[0059] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this embodiment, unless otherwise specified, "plurality" means two or more.

[0060] In addition, the terms "including" and "having" and any variations thereof mentioned in the description of this application are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or modules is not limited to the listed steps or modules, but may optionally include other steps or modules that are not listed, or may optionally include other steps or modules that are inherent to these processes, methods, products or devices.

[0061] In addition, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present concepts in a specific way.

[0062] With the continuous development of computer technology, the business needs of users or enterprises are getting higher and higher, and new servers are needed to meet business needs. When using a new server, users need to migrate the data in the current server (which can be called the source host) to the new server (destination host). For example, users can move the server to the cloud and migrate their data to the cloud server. Users can access their data anytime and anywhere through the Internet.

[0063] With the continuous development of computer technology, servers need to be constantly iterated to meet business needs. When using a new server, you can redeploy the new server to enable the server to run the business. Alternatively, the server can migrate the data in the currently used server (which can be referred to as the source host) to the new server (which can be referred to as the destination host) through host migration to ensure that the destination host can run the business.

[0064] Currently, when migrating data from a source host to a destination host, four steps are required to complete the data migration: full migration, stopping services (i.e., the source host stops serving the services), incremental migration, and cutover services (the destination host provides services for the services). The following introduces the four steps of data migration.

[0065] First, during a full migration, the source host will transfer the data blocks in the disk to the destination host one by one. For example, Figure 1 As shown, service A is running on the source host. During full migration, the source host can transfer data in the source host disk to the destination host through network transmission. An agent image is deployed on the destination host, and the agent image includes a preset operating system. The agent image can receive data from the destination host and write the data to the destination host's disk.

[0066] At the same time, since the source host is still running services (such as writing data on the source host) during the full migration, the source host will still have data changes during the full migration process. At this time, the source host can record a piece of information to record the data blocks that have changed.

[0067] Exemplary, combined Figure 1 It can be seen that during the full migration of the source host, the services running on the source host need to write data to the source host disk. The input / output (IO) driver can write data to the source host disk and record the data blocks where the data has changed in the bitmap. Figure 2As shown, after the source host transmits the data of data block 201, data block 202, and data block 203 in sequence to the destination host, the service end requests to write data in data block 201. At this time, the data of data block 201 changes, and the source host can record data block 201.

[0068] Second, after the full migration is complete, the source host can stop running services. Figure 1 The source host no longer receives requests from the business end (such as requests to access data in the source host or modify data in the source host), nor does it write data to the source host disk.

[0069] Then, the destination host can perform incremental migration. Specifically, the source host can resend the data blocks with changed data to the destination host based on the recorded information to ensure that the data of the source host and the destination host are consistent.

[0070] Then, the user can configure services for the destination host and complete service cutover, so that the destination host can provide services for the business.

[0071] However, in the above data migration process, the incremental migration process and the service cutover process all need to stop the service operation, which will cause the service to stagnate for a long time and affect the use of the service.

[0072] To this end, an embodiment of the present application provides a method for data migration. In the method, the destination host can first receive the stock data from the source host and complete the full migration. Afterwards, the destination host can perform a cutover operation to complete the cutover of the service to run the target service. Afterwards, while the destination host is running the target service, the destination host can obtain incremental data from the source host to complete the incremental migration. In this way, the destination host can run the service at the same time when performing incremental migration, shortening the service stagnation time and reducing the impact of data migration on the service.

[0073] It should be noted that the business in this application refers to websites, applications, databases, etc. deployed and running in the server. The application can be an embedded application (i.e., a system application of the server) installed in the server through an installation package or a downloadable application. Among them, an embedded application is an application provided as part of the server implementation. A downloadable application is an application that can provide its own Internet Protocol Multimedia Subsystem (IMS) connection. The downloadable application can be an application pre-installed in the server or a third-party application that can be downloaded and installed in the server by the user.

[0074] For example, the application may be a file management application, which includes multiple functions for file management. For another example, the application may be an image processing application, which includes multiple functions for image processing.

[0075] It should be noted that the source host and the destination host in the embodiment of the present application can be servers (or computing device clusters), virtualization platforms, cloud platforms, etc., respectively, and the embodiment of the present application is not limited to this. For example, if the source host is a computing device cluster and the destination host is a cloud platform, the source host can upload data to the cloud platform. For another example, if the source host is a computing device cluster and the destination host is a computing device cluster, the source host can migrate data from one computing device cluster to another computing device cluster. The following takes the example that both the source host and the destination host are computing device clusters to introduce the embodiment of the present application.

[0076] The implementation environment of the embodiments of the present application is introduced below.

[0077] like Figure 3 As shown, a data migration system provided by an embodiment of the present application includes: a computing device cluster 301 and a computing device cluster 302. The computing device cluster 301 and the computing device cluster 302 can communicate with each other in a wired or wireless manner.

[0078] Among them, the computing device cluster 301 (or computing device cluster 302) can be connected by a group of loosely integrated computer software or hardware to collaborate closely to complete the computing work, and the computing device cluster 301 can also be regarded as a computer (i.e., server). A single computer in the computing device cluster 301 is usually called a node, and the nodes can be connected by means of a local area network, a high-speed interconnection, remote direct memory access (RDMA), distributed shared memory, etc. The computing device cluster 301 may include one or more clusters of a high-availability cluster, a load balancing cluster, a high-performance computing cluster, and a high-availability cluster. The computing device cluster 301 may include: hardware resources (such as servers, memory, central processing unit (CPU), etc.) and service resources (such as software, integrated development environment, etc.). The memory may include at least one or more of the following: a disk, a hard disk, a solid-state hard disk, a memory card, an optical disk, a floppy disk, etc. The following takes the memory as a disk as an example to introduce the embodiment of the present application.

[0079] In an embodiment of the present application, at least one application is deployed in the computing device cluster 301, and one application is used to implement one or more services. The computing device cluster 301 can run the deployed application to implement the service of the application. The computing device cluster 301 also stores data, which includes: system files, applications, business data, etc. The data in the computing device cluster 301 can be stored in a memory (such as a disk). The computing device cluster 301 also includes an IO driver, which is used to write data to the memory. The IO driver is also used to monitor changes in data in the data blocks of the storage device. The computing device cluster 301 can transmit data to the computing device cluster 301 via wired / wireless mode.

[0080] The computing device cluster 302 may receive data from the computing device cluster 301 and write the data to a storage device (such as a disk) in the computing device cluster 302. After receiving the data, the computing device cluster 302 may configure the service corresponding to the application program to run the application program migrated from the computing device cluster 301. In addition, when the computing device cluster 302 runs the application program, the computing device cluster 302 may actively request data from the computing device cluster 301.

[0081] Optionally, the computing device cluster 302 may also include an IO driver.

[0082] The execution subject (ie, the source host and the destination host) of the data migration method provided in the present application may be a data migration device, and the data migration device may be Figure 3 The computing device cluster shown. At the same time, the data migration device can also be a central processing unit (CPU) of the data migration device, or a migration module for data migration in the data migration device. In the embodiment of the present application, the source host and the destination host are both computing device clusters as an example to illustrate the data migration method provided by the embodiment of the present application.

[0083] The present application embodiment provides a method for data migration, such as Figure 4 As shown, the data migration method may include:

[0084] S401: The source host obtains a migration instruction.

[0085] The migration instruction is used to instruct the migration of data in each data block in the source host to the destination host.

[0086] In a possible implementation manner, the source host may receive a migration instruction input by a user.

[0087] Exemplarily, a user may input a migration trigger operation to a source host, and in response to the migration trigger operation, the source host generates a migration instruction.

[0088] In another possible implementation, a migration script is deployed in the source host, and the source host can run the migration script to generate a migration instruction.

[0089] S402: In response to the migration instruction, the source host sends the stock data to the destination host.

[0090] In the embodiment of the present application, a storage device (such as a disk) is deployed in the source host, and the data in the disk is stored in a data block granularity. The stock data is the data in the data block when the source host sends the data block to the destination host.

[0091] Exemplarily, if the source host sends data in data block a to the destination host, and data block a includes: data 1 and data 2, then the existing data in data block a sent by the source host to the destination host is data 1 and data 2.

[0092] In a possible implementation, in response to the migration instruction, the source host may scan each data block in the disk, and send the data in each data block to the destination host in sequence according to a preset order.

[0093] In a possible design, the preset order may be the order of data block storage addresses from large to small. Alternatively, the preset order may be the order of data block storage addresses from small to large.

[0094] It should be noted that, in the embodiment of the present application, after the source host sends the data in a data block to the destination host, the source host will not send the data in the data block a second time. In other words, the source host will not send the data in the data block repeatedly.

[0095] Exemplary, combined Figure 2 If the preset order is the order of storage addresses from small to large, the storage address of data block 201 is the smallest, and the storage address of data block 204 is the largest, then the destination host can send the data in data block 201, data block 202, and data block 203 to the destination host in sequence, and stop sending the existing data to the destination host after sending the data in data block 204 to the destination host.

[0096] S403: The destination host receives and stores the stock data from the source host.

[0097] In a possible implementation, the destination host may receive the data in each data block from the source host, and write the data to a disk of the destination host.

[0098] In a possible design, when the source host transmits data to the destination host, the source host carries the identifier of the data block to which the data belongs. The destination host can write the data into the data block corresponding to the identifier of the data block according to the identifier of the data block.

[0099] It should be noted that the embodiment of the present application does not limit the identifier of the data block. For example, the identifier of the data block may be the address of the data block. For another example, the identifier of the data block may be composed of a character string.

[0100] For example, Figure 5 As shown, the source host disk includes: data block a (including data 1 and data 2), data block b (including data 3) and data block c (including data 4 and data 5). After the source host sends the data in data block a, data block b and data block c to the destination host, the destination host disk may include: data block a (including data 1 and data 2), data block b (including data 3) and data block c (including data 4 and data 5).

[0101] It is understandable that the destination host writes data into the corresponding data block, which can ensure that the data blocks stored in the source host and the destination host are the same, so that the destination host can access the data when running the service.

[0102] S404: The source host generates incremental information.

[0103] The incremental information is used to indicate at least one incremental data block, where the incremental data block is a data block in which data has been changed after the data in the data block has been migrated to the destination host.

[0104] In the embodiment of the present application, when the source host sends stock data to the destination host, the source host runs the target service. The source host can obtain the data change request of the target service and update the data in the data block according to the data change request, and the data change request is used to indicate the change of data in the data block.

[0105] It should be noted that the embodiments of the present application do not limit the data change request. For example, the data change request can be used to indicate the deletion of data in a data block. For another example, the data change request can be used to indicate the modification of data in a data block. For another example, the data change request can be used to indicate the addition of new data in a data block.

[0106] Optionally, the data changed in the incremental data block may also be system data, user data, etc., which is not limited in the present embodiment. The following takes the incremental data block as a data block where new data is written as an example to introduce the incremental data block.

[0107] Exemplary, combined Figure 2, if the source host writes data 3 into data block 201 after transmitting the existing data (such as data 1 and data 2) in data block 201 to the destination host, then data block 201 is an incremental data block.

[0108] In a possible implementation, during the process of the source host sending a data block to the destination host, the source host may generate synchronization information, which is used to indicate the data block that has been migrated. After the source host receives the data change request, the source host may determine whether the data block has been migrated based on the synchronization information. If the data block has been migrated, the source host determines the data block as an incremental data block and records it in the incremental information. In addition, the source host may update the data in the data block. If the data block has been migrated, the source host may update the data in the data block.

[0109] It should be noted that during the full migration of the source host, the source host can continuously update the incremental information until the full migration is completed and stops updating the incremental information.

[0110] Exemplarily, the incremental information may include: an identifier of each incremental data block. Alternatively, the incremental information may be represented by a bitmap.

[0111] In one possible design, the incremental information can be stored on disk. Alternatively, the incremental information can be stored in memory.

[0112] It is understandable that storing the incremental information in the memory can increase the speed of reading and writing the incremental information.

[0113] It should be understood that the above steps (ie, S401-S404) are a process of full data migration (ie, migrating the existing data in the source host to the destination host). The process of cutting over the service (ie, S405-S408) is introduced below.

[0114] S405: When the migration of stock data is completed, the source host obtains a service stop instruction.

[0115] The service stop instruction is used to instruct to stop running a target service, where the target service is one or more services in the source host.

[0116] That is, the target service may be at least one service running on the source host, or the target service may include all services running on the source host.

[0117] In a possible implementation, when the migration of stock data is completed, the source host may send a first migration completion message, which is used to indicate that the migration of stock data has been completed. Afterwards, the source host may receive a service stop operation from the user, and in response to the service stop operation, the source host generates a service stop instruction.

[0118] In another possible implementation, when the migration of stock data is completed, the source host automatically generates a service stop instruction.

[0119] S406: In response to the service stop instruction, the source host stops running the target service.

[0120] S407: The destination host obtains a cutover instruction.

[0121] The cutover instruction is used to instruct the operation of the target service. The cutover instruction can also be used to instruct the configuration of the target service.

[0122] In one possible design, the cutover instruction may include: configuration information of the target service, where the configuration information is used to configure the target service.

[0123] Exemplarily, taking the target service as a website as an example, the configuration information may include: an Internet protocol (IP) address of a destination host, configuration items of the website, application activation instructions, and the like.

[0124] In a possible implementation, when the migration of stock data is completed, the source host may generate a cutover instruction and send the cutover instruction to the destination host.

[0125] In another possible implementation manner, the source host may receive a cutover operation from a user and generate a cutover instruction.

[0126] S408: In response to the cutover instruction, the destination host runs the target service.

[0127] After introducing the process of cutting over the service (ie, S405 - S408 ), the process of incremental migration (ie, S409 - S411 ) is introduced below.

[0128] S409: The destination host obtains incremental information from the source host.

[0129] In a possible implementation, the incremental information is stored in a disk of the source host, and the source host can actively transmit the incremental information to the destination host, wherein the stock data includes the incremental information, and the destination host can receive the incremental information from the source host.

[0130] In another possible implementation, the destination host may actively obtain the incremental information. The destination host may send a first request message to the source host, and the first request message is used to request to obtain the incremental information. The source host may receive the first request message from the destination host, and send the incremental information to the destination host in response to the first request message. The incremental information may be stored in a disk of the source host, or the incremental information may be stored in a memory of the source host.

[0131] It should be noted that the destination host may start to obtain incremental information from the source host before cutting over the target service (configuring the target service and / or running the target service). Alternatively, the destination host may start to obtain incremental information from the source host after cutting over the target service.

[0132] S410. The destination host obtains data in each incremental data block from the source host according to the incremental information.

[0133] In one possible design, the incremental information may include: migration information of each incremental data block, where the migration information is first information or second information, the first information is used to indicate that the data in the incremental data block has not been migrated to the destination host, and the second information is used to indicate that the data in the incremental data block has been migrated to the destination host.

[0134] It should be noted that the embodiment of the present application does not limit the representation form of the migration information. For example, the migration information can be represented by numbers (such as 0, 1). For another example, the migration information can be represented by letters (such as a, b). For another example, the migration information can be represented by a mixture of letters and numbers.

[0135] Exemplarily, as shown in Table 1, it shows the incremental information.

[0136] Table 1

[0137] Data Block Migration information Data block a 1 Data block b 0 Data block c 1

[0138] As can be seen from Table 1, if the first information is 1 and the second information is 0, data block a and data block c are incremental data blocks.

[0139] In a possible implementation, the destination host determines each incremental data block according to the incremental information. Afterwards, the destination host may send an incremental synchronization request to the source host, where the incremental synchronization request is used to request to obtain data in the incremental data block. The source host may receive the incremental synchronization request from the destination host, and in response to the incremental synchronization request, send the data in the incremental data block to the destination host. Accordingly, the destination host may receive the data in the incremental data block from the source host.

[0140] S411. The destination host stores the data in the incremental data block.

[0141] In some embodiments, after the destination host stores the data in the incremental data block, the destination host may update the migration information corresponding to the incremental data block that has been migrated to the destination host to the second information.

[0142] Exemplarily, in conjunction with Table 1, if the destination host migrates the data in data block a to the destination host, the migration information of data block a may be updated from 1 to 0.

[0143] It should be noted that the embodiment of the present application does not limit the order in which the destination host executes the cutover service (i.e., S405-S408) and the incremental migration (i.e., S409-S411). For example, the destination host may first execute the cutover service and then execute the incremental migration. For another example, the destination host may first execute the incremental migration and then execute the cutover service. For another example, the destination host may execute the cutover service and the incremental migration at the same time.

[0144] Based on the above technical solution, the destination host can obtain and store the existing data from the source host to complete the full migration of data. When the migration of existing data is completed, the source host can stop running the target business. Afterwards, the destination host can obtain the cutover instruction and run the target business. In addition, the source host can generate incremental information and transmit the incremental information to the destination host. The incremental information is used to indicate the data blocks in which the data has changed after the data in the data blocks has been migrated to the destination host. Afterwards, the destination host can obtain the data in each incremental data block from the source host based on the incremental information, and store the data in the incremental data block. In this way, the destination host can run the business at the same time when performing incremental migration, shortening the business stagnation time and reducing the impact of data migration on the business.

[0145] After introducing the process of migrating data from a source host to a destination host, the following describes the process of performing incremental migration on the destination host and running the target business on the destination host.

[0146] In the embodiment of the present application, during the process of the destination host running the target service, the destination host may obtain a service request, which is used to indicate reading and writing data. Afterwards, in response to the service request, the destination host may read and write data on the destination host or the source host.

[0147] The following takes the service request used to indicate reading data as an example to introduce the process of the destination host running the target service.

[0148] In some embodiments, in response to a service request, if the service request is used to instruct to read data, the destination host determines to read data from the destination host or the source host based on current incremental information.

[0149] It should be noted that, since the incremental information may be in a state of continuous updating, the current incremental information mentioned in the embodiments of the present application refers to the latest incremental information after the current update.

[0150] In a possible implementation, the service request includes an identifier of the third data block, and the third data block is a data block that the service request indicates to read. The destination host can determine whether the migration information of the third data block in the current incremental information is the first information based on the identifier of the third data block. If the migration information of the third data block is the first information, the destination host reads the data in the third data block from the source host.

[0151] In a possible design, the destination host may send a data read request to the source host, the data read request being used to instruct to read the data of the third data block. Afterwards, the source host may send the data in the third data block to the destination host. After receiving the data in the third data block from the source host, the destination host may send the data in the third data block to the service end.

[0152] For example, Figure 6 As shown in FIG. 1 , if the migration information of data block a and data block c is the first information, and the migration information of data block b and data block d is the second information. When the destination host reads data block a, the data in data block a can be read from the disk of the source host.

[0153] It is understandable that if the migration information of the third data block is the first information, it means that the data in the read data block has not been migrated. In this way, the destination host reads data from the source host, which can ensure the accuracy of the data.

[0154] Optionally, after the destination host receives the data in the third data block from the source host, the destination host may store the data in the third data block read from the source host, and update the migration information of the third data block to the second information.

[0155] It is understandable that by storing data and updating migration information, the real-time nature of the migration information can be guaranteed and repeated migration of data in the data block can be avoided.

[0156] In another possible implementation, if the migration information of the third data block in the current incremental information is the second information, the destination host reads the data in the third data block from the destination host.

[0157] Exemplary, combined Figure 6 When the destination host reads data block b, the data of data block b can be read from the disk of the destination host.

[0158] It is understandable that if the migration information of the third data block is the second information, it means that the data in the read data block has been migrated. In this way, data can be directly read from the destination host to improve the efficiency of reading data.

[0159] The following takes the service request used to indicate writing data as an example to introduce the process of the destination host running the target service.

[0160] In an embodiment of the present application, in response to a service request, if the service request is used to indicate writing data in a first data block, the destination host determines to write data in a second data block according to current incremental information, wherein the second data block is different from the first data block, or the second data block is the same as the first data block.

[0161] In a possible implementation, the service request includes an identifier of the first data block. The destination host can determine whether the migration information of the first data block in the current incremental information is the first information based on the identifier of the first data block. If the migration information of the first data block is the first information, the second data block is different from the first data block, and the second data block is a data block in the destination host other than the data block whose migration information is the first information.

[0162] That is to say, if the data block to which data is to be written has not completed incremental migration, the data is not written into the data block but is written into other data blocks.

[0163] In a possible design, the second data block may be a data block whose migration information is the second information. That is to say, all the data in the second data block has been migrated to the destination host.

[0164] Alternatively, the second data block may be an idle data block, that is, no data is stored in the second data block.

[0165] For example, Figure 7 As shown, if the migration information of data block a and data block c is the first information, and the migration information of data block b and data block d is the second information, when the destination host receives a request to write data in data block a, it can write the data into data block b.

[0166] It is understandable that if the migration information of the first data block is the first information, it means that the data in the first data block has not been migrated. Therefore, writing the data into the second data block can avoid overwriting the already written data when migrating the data in the first data block, thereby ensuring the integrity of the data.

[0167] In another possible implementation manner, if the migration information of the first data block in the current incremental information is the second information, the second data block is the same as the first data block.

[0168] That is, if the data block to which data is to be written has completed incremental migration, the data can be written into the data block.

[0169] Exemplary, combined Figure 7 When the destination host receives a request to write data in data block d, it can write the data into data block d.

[0170] It is understandable that if the migration information of the first data block is the second information, it means that the data in the first data block has been migrated. Therefore, the destination host writes data into the first data block without affecting the integrity of the data in the first data block.

[0171] Based on the above technical solution, it can be seen that the target host can still run the target business during incremental migration, and the normal operation of the target business will not be affected. In this way, the business stagnation time can be shortened, thereby reducing the impact of data migration on the business.

[0172] The following uses specific examples to introduce the full migration process and incremental migration process in the data migration process.

[0173] like Figure 8 As shown, it shows the process of full migration. Among them, the source host may include: target business, target driver, incremental information, source host disk, migration application, wherein the target driver is used to read and write data, and the migration application is used to trigger the migration of data from the source host to the destination host. The destination host may include: a proxy object and a destination host disk, and the proxy object is preset with a first operating system.

[0174] In the embodiment of the present application, the target service can perform read and write operations on the source host disk through the target driver. In addition, the migration program can read the stock data from the source host disk and send the stock data to the destination host. The destination host can receive the stock data from the source host through the proxy object. In addition, the proxy object can write the received stock data to the destination host disk.

[0175] For example, Figure 8 As shown, the migration application in the source host can read data from the source host disk and transfer the data to the proxy object (such as the proxy image) of the destination host. Afterwards, the proxy image can write the data to the destination host disk.

[0176] At the same time, when the target driver performs read and write operations on the source host disk, the target driver can also generate incremental information to record incremental data blocks.

[0177] For example, Figure 8As shown, when the target service generates new data, the target driver (also called IO driver) can write the data into the data block of the source host disk. At the same time, if the data block has been migrated, the target driver records the data block in the incremental information (such as recording the migration information of the data block as the first information).

[0178] In a possible design, the proxy object may be a proxy image, which is a image pre-deployed on the destination host.

[0179] In another possible design, the proxy object may be a mounted device connected to the destination host. For example, the mounted device may be a USB flash drive.

[0180] That is to say, in the embodiment of the present application, when the source host sends stock data to the destination host, the destination host starts the first operating system in the proxy object and writes the stock data to the destination host disk through the first operating system in the proxy object.

[0181] It is understandable that the destination host receives the stock data of the source host through the proxy object, which can avoid the situation where the destination host has no operating system and thus cannot perform data migration.

[0182] In some embodiments, after the full migration is completed, the destination host can restart using the operating system of the source host. The stock data also includes: the second operating system of the source host. When the stock data migration is completed, the destination host can uninstall the proxy image and restart the second operating system in the destination host.

[0183] In a possible implementation, when the stock data migration is completed, the source host may send a restart instruction to the destination host, the restart instruction being used to instruct the destination host to uninstall the proxy image and start the second operating system. Afterwards, the destination host may receive the restart instruction from the destination host, and in response to the restart instruction, uninstall the proxy image and restart the second operating system in the destination host.

[0184] In another possible implementation, the destination host may receive a restart operation from the user. In response to the restart operation, the destination host may uninstall the proxy image and restart the second operating system in the destination host.

[0185] It should be noted that the first operating system and the second operating system may be the same operating system, or the first operating system and the second operating system may be different operating systems, which is not limited in the embodiments of the present application.

[0186] It is understandable that the stock data includes the second operating system of the source host, and the destination host can be restarted through the second operating system. In this way, subsequent data migration and business operations can be guaranteed to run normally. In addition, by uninstalling the proxy image, the storage resources of the destination host can be saved and resource utilization can be improved.

[0187] After introducing the full migration process, the following describes the incremental migration process.

[0188] like Fig. 9 As shown, it shows the process of incremental migration. Among them, the source host may include: source host disk. The destination host may include: target business, target driver, incremental information, destination host disk, and migration application. Among them, the migration application is used to trigger the migration of data from the source host to the destination host, and the target driver is used to read and write data.

[0189] The incremental migration process can be divided into reading data from the source host and writing the data read from the source host to the destination host disk. The following first introduces the process of reading data from the source host.

[0190] In the embodiment of the present application, when the migration of the stock data is completed, the destination host can start the migration application. After that, the destination host can obtain the data in each incremental data block from the source host according to the incremental information through the migration application.

[0191] Exemplary, combined Fig. 9 ,The migration application of the destination host can obtain the incremental information, and read the data from the source host disk based on the incremental information.

[0192] In a possible design, the migration application can be started automatically when the computer is powered on. That is, after the destination host restarts the second operating system, the destination host can start the migration application and trigger the acquisition of data in each incremental data block.

[0193] In another possible design, the destination host may receive an incremental migration operation from a user. In response to the incremental migration operation, the destination host may start a migration application and trigger acquisition of data in each incremental data block.

[0194] Optionally, the stock data also includes: a migration application. Alternatively, the destination host has a migration application deployed thereon.

[0195] That is, the migration application may be transmitted from the source host to the destination host. Alternatively, the migration application may be pre-installed on the destination host. For example, the user may pre-install the migration application on the destination host.

[0196] It is understandable that when the migration of stock data is completed, the destination host can start the migration application, so that the migration application can obtain the data in each incremental data block from the source host according to the incremental information. In this way, the destination host can actively obtain the incremental data from the source host to ensure the integrity of the target business data.

[0197] In some embodiments, when the data migration in each incremental data block is completed, the destination host may uninstall the migration application.

[0198] Exemplarily, the destination host may obtain the incremental information and determine whether the migration information of each incremental data block is the second information. If the migration information of each incremental data block is the second information, the destination host determines that the data in each incremental data block has been migrated.

[0199] It is understandable that when the data migration in each incremental data block is completed, it means that all data in the source host has been migrated to the destination host, and the destination host no longer needs to migrate data through the migration application. In this way, the destination host can uninstall the migration application to save storage resources of the destination host.

[0200] After introducing the process of reading data from the source host, the process of writing the data read from the source host to the destination host disk is introduced below.

[0201] In an embodiment of the present application, the destination host can start a target driver and, through the target driver, write the data in each incremental data block read from the source host to the destination host.

[0202] Exemplary, combined Fig. 9 After the migration application of the destination host reads the data from the source host disk, the migration application can transfer the data to the destination drive of the destination host, and the destination drive writes the data to the destination host disk.

[0203] In a possible design, the target driver is automatically started upon startup. That is to say, after the target host restarts the second operating system, the target host can start the target driver and read and write data in the target host disk.

[0204] In another possible design, the destination host may receive a drive start operation from the user, and in response to the drive start operation, the destination host may start the target drive.

[0205] In some embodiments, during the incremental migration process, the destination host may run the target service and perform read and write operations on the target service through the target driver.

[0206] Exemplary, combined Fig. 9, the target driver can obtain the read and write request from the target business. After that, the target driver can obtain the incremental information and perform read and write operations based on the incremental information.

[0207] That is, the target driver of the destination host can perform read and write operations on the target service while writing the incremental data of the source host to the destination host disk. Figure 6 and Figure 7 ), which will not be elaborated here.

[0208] It is understandable that the target driver can not only read and write the target business, but also write the data in the incremental data block to the destination host. In this way, it can ensure that the target business can be run during incremental migration, thereby shortening the business stagnation time and reducing the impact of data migration on the business.

[0209] In some embodiments, the destination drive is unmounted upon completion of data migration in each incremental data block.

[0210] It is understandable that when the data migration in each incremental data block is completed, it means that the incremental migration has been completed, and there is no need to perform incremental migration and run the target business at the same time. In this way, the destination host can save storage resources of the destination host by uninstalling the destination drive.

[0211] In some embodiments, the proxy object may also be a proxy server. The proxy server is connected to the source host and the destination host. The destination host may perform stock migration through the proxy server.

[0212] For example, Fig.10 As shown, the proxy server can read data from the source host disk and write the data to the destination host disk. Optionally, a migration application is deployed in the proxy server.

[0213] In some embodiments, the destination host may also perform incremental migration through a proxy server.

[0214] like Fig.11 As shown, the proxy server includes: incremental information and a migration application. The migration application in the proxy server can read data from the source host according to the incremental information. Afterwards, the proxy server can transmit the read data to the target drive of the destination host. Then, the target drive of the destination host can write the data to the destination host disk.

[0215] At the same time, the destination host can also read data from the source host through the proxy server during the incremental migration process through the proxy server.

[0216] Exemplary, combined Fig.11 , the destination host may include: target business, target driver, incremental information, and destination host disk. When the target driver determines that it needs to read data from the source host, it can read data from the source host through the migration application of the proxy server.

[0217] In an embodiment of the present application, the incremental information in the proxy server and the incremental information of the destination host can be synchronized in real time.

[0218] It should be noted that, for the specific process of performing incremental synchronization through the proxy server when the destination host runs the target service, reference can be made to the introduction in the above embodiment (eg Figure 6 and Figure 7 ), which will not be elaborated here.

[0219] The present application embodiment provides a method for data migration, such as Fig.12 As shown, the data migration method may include:

[0220] S1201. The destination host receives and stores the stock data from the source host.

[0221] S1202: When the migration of existing data is completed, the destination host obtains a cutover instruction.

[0222] The cutover instruction is used to instruct the operation of a target service, where the target service is a service that is operated on a source host.

[0223] S1203: In response to the cutover instruction, the destination host runs the target service.

[0224] S1204. The destination host obtains incremental information from the source host.

[0225] The incremental information is used to indicate at least one incremental data block, where the incremental data block is a data block in which data has been changed after the data in the data block has been migrated to the destination host.

[0226] S1205. The destination host obtains the data in each incremental data block from the source host according to the incremental information, and stores the data in the incremental data block.

[0227] It should be noted that, for a specific introduction to the process of the destination host running the target service during the incremental migration process, reference may be made to the above embodiments (such as Figure 4 , Figure 6 , Figure 7 The description in , etc., will not be repeated here.

[0228] Based on the above technical solution, the destination host can obtain and store the existing data from the source host to complete the full migration of data. When the migration of the existing data is completed, the destination host can obtain the cutover instruction and run the target business. In addition, the destination host can obtain incremental information, which is used to indicate the data blocks in which the data has changed after the data in the data block has been migrated to the destination host. Afterwards, the destination host can obtain the data in each incremental data block from the source host based on the incremental information, and store the data in the incremental data block. In this way, the destination host can run the business at the same time when performing incremental migration, shortening the business stagnation time and reducing the impact of data migration on the business.

[0229] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of an electronic device. It is understandable that, in order to realize the above functions, the electronic device includes a hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the method steps of a data migration of each example described in the embodiment disclosed in this application, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or electronic device software driving hardware 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 this application.

[0230] The embodiment of the present application can divide the data migration device into functional modules or functional units according to the above method example. For example, each functional module or functional unit can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules or functional units. Among them, the division of modules or units in the embodiment of the present application is schematic, which is only a logical function division. There may be other division methods in actual implementation.

[0231] Please refer to Fig.13 , which shows a schematic diagram of a data migration device provided in an embodiment of the present application. The data migration device may be a functional module in the above-mentioned destination host for implementing the method of the embodiment of the present application. Fig.13 As shown, the data migration device may include: a receiving module 1301 and a processing module 1302 .

[0232] The receiving module 1301 is used to receive and store the stock data from the source host. The processing module 1302 is used to obtain a cutover instruction, which is used to instruct the operation of the target business, and the target business is the business running on the source host. The processing module 1302 is also used to operate the target business in response to the cutover instruction. The receiving module 1301 is used to obtain incremental information from the source host after the target business is operated, and the incremental information is used to indicate at least one incremental data block, and the incremental data block is a data block in which the data has been changed after the data in the data block has been migrated to the destination host. The processing module 1302 is also used to obtain the data in each incremental data block from the source host according to the incremental information, and store the data in the incremental data block.

[0233] In a possible design, the incremental information includes: migration information of each incremental data block, the migration information is first information or second information, the first information is used to indicate that the data in the incremental data block has not been migrated to the destination host, and the second information is used to indicate that the data in the incremental data block has been migrated to the destination host. The processing module 1302 is also used to update the migration information corresponding to the incremental data block that has been migrated to the destination host to the second information.

[0234] In another possible design, the processing module 1302 is also used to obtain a service request, and the service request is used to indicate reading and writing data. The processing module 1302 is also used to determine whether to read data from the destination host or the source host based on the current incremental information if the service request is used to indicate reading data. The processing module 1302 is also used to determine whether to write data in the second data block based on the current incremental information if the service request is used to indicate writing data in the first data block, and the second data block is different from the first data block, or the second data block is the same as the first data block, and the second data block is a data block in the destination host except that the migration information is the first information.

[0235] In another possible design, the processing module 1302 is further configured to read data in the third data block from the source host if the migration information of the third data block in the current incremental information is the first information, and the third data block is the data block indicated to be read by the service request. The processing module 1302 is further configured to read data in the third data block from the destination host if the migration information of the third data block in the current incremental information is the second information.

[0236] In another possible design, the processing module 1302 is further configured to store data in a third data block read from the source host, and update the migration information of the third data block to the second information.

[0237] In another possible design, if the migration information of the first data block in the current incremental information is the first information, the second data block is different from the first data block, and the second data block is a data block in the destination host other than the data block whose migration information is the first information. If the migration information of the first data block in the current incremental information is the second information, the second data block is the same as the first data block.

[0238] In another possible design, the processing module 1302 is also used to start the target driver, which is used to read and write data. The target driver is used to perform read and write operations on the target service. The processing module 1302 is also used to write the data in each incremental data block read from the source host to the destination host through the target driver.

[0239] In another possible design, the receiving module 1301 is further used to receive and store stock data from the source host, where the stock data includes: a target driver; or, the destination host is deployed with a target driver.

[0240] In another possible design, the processing module 1302 is further configured to start a migration application when the migration of the stock data is completed, and the migration application is configured to trigger the migration of the data of the source host to the destination host. The processing module 1302 is further configured to obtain the data in each incremental data block from the source host according to the incremental information through the migration application.

[0241] In another possible design, the stock data also includes: a migration application; or, the destination host is deployed with a migration application.

[0242] In another possible design, the processing module 1302 is further configured to uninstall the destination driver and / or the migration application when the data migration in each incremental data block is completed.

[0243] In another possible design, the receiving module 1301 is further used to receive stock data from the source host through a proxy object, and the proxy object is preset with a first operating system.

[0244] In another possible design, the proxy object is a proxy image deployed on the destination host, or the proxy object is a proxy server.

[0245] In another possible design, the stock data also includes: a second operating system of the source host. The processing module 1302 is further configured to uninstall the proxy image and restart the second operating system in the destination host when the stock data migration is completed.

[0246] Please refer to Fig.14, which shows a schematic diagram of a data migration device provided in an embodiment of the present application. The data migration device may be a functional module in the above-mentioned source host for implementing the method of the embodiment of the present application. Fig.14 As shown, the data migration device may include: a processing module 1401 , a sending module 1402 , and a receiving module 1403 .

[0247] The processing module 1401 is used to obtain a migration instruction, and the migration instruction is used to instruct the migration of data in each data block in the source host to the destination host. The sending module 1402 is used to send the existing data to the destination host in response to the migration instruction. The processing module 1401 is also used to generate incremental information, and the incremental information is used to indicate at least one incremental data block. The incremental data block is a data block in which the data in the data block has changed after the data in the data block has been migrated to the destination host. The processing module 1401 is also used to obtain a business stop instruction when the migration of the existing data is completed, and stop running the target business in response to the business stop instruction. The receiving module 1403 is used to receive an incremental synchronization request from the destination host, and the incremental synchronization request is used to request to obtain the data in the incremental data block. The sending module 1402 is also used to send the data in the incremental data block to the destination host.

[0248] In a possible design, the stock data includes: a target driver and / or a migration application; or, the target driver and / or the migration application is deployed on the destination host.

[0249] Among them, the receiving module 1301, the processing module 1302, the processing module 1401, the sending module 1402 and the receiving module 1403 can all be implemented by software, or can be implemented by hardware. Exemplarily, the implementation of the receiving module 1301 is introduced below by taking the receiving module 1301 as an example. Similarly, the implementation of other modules (such as the processing module 1302) can refer to the implementation of the receiving module 1301.

[0250] As an example of a software functional unit, the receiving module 1301 may include code running on a computing instance. Among them, the computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Further, the above-mentioned computing instance may be one or more. For example, the receiving module 1301 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed in the same region (region) or in different regions. Furthermore, the multiple hosts / virtual machines / containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including a data center or multiple data centers with similar geographical locations. Among them, usually a region may include multiple AZs.

[0251] Similarly, multiple hosts / virtual machines / containers used to run the code can be distributed in the same virtual private cloud (VPC) or in multiple VPCs. Usually, a VPC is set up in a region. For cross-region communication between two VPCs in the same region and between VPCs in different regions, a communication gateway needs to be set up in each VPC to achieve interconnection between VPCs through the communication gateway.

[0252] As an example of a hardware functional unit, the receiving module 1301 may include at least one computing device, such as a server, etc. Alternatively, the receiving module 1301 may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.

[0253] The multiple computing devices included in the receiving module 1301 can be distributed in the same region or in different regions. The multiple computing devices included in the receiving module 1301 can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in the receiving module 1301 can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.

[0254] It should be noted that, in other embodiments, the receiving module 1301 can be used to execute any step in the data migration method, and the processing module 1302 can be used to execute any step in the data migration method. The receiving module 1301, the processing module 1302 and the steps responsible for implementation can be specified as needed. The full functions of the data migration device are realized by the receiving module 1301, the processing module 1302 and the different steps in the data migration method that are implemented respectively.

[0255] The present application also provides a computing device 150. Fig.15 As shown, the computing device 150 includes: a bus 1502, a processor 1504, a memory 1506, and a communication interface 1508. The processor 1504, the memory 1506, and the communication interface 1508 communicate through the bus 1502. The computing device 150 can be a server or a terminal device. It should be understood that the present application does not limit the number of processors and memories in the computing device 150.

[0256] The bus 1502 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.15 The bus 1504 may include a path for transmitting information between various components of the computing device 150 (eg, the memory 1506, the processor 1504, and the communication interface 1508).

[0257] The processor 1504 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0258] The memory 1506 may include a volatile memory, such as a random access memory (RAM). The processor 1504 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD).

[0259] The memory 1506 stores executable program codes, and the processor 1504 executes the executable program codes to respectively implement the functions of the aforementioned receiving module 1301 and the processing module 1302, thereby implementing the data migration method. That is, the memory 1506 stores instructions for executing the data migration method.

[0260] The communication interface 1503 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 150 and other devices or a communication network.

[0261] The embodiment of the present application also provides a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smart phone.

[0262] like Fig.16 As shown, the computing device cluster includes at least one computing device 150. The memory 1506 in one or more computing devices 150 in the computing device cluster may store the same instructions for executing the method for data migration.

[0263] In some possible implementations, the memory 1506 of one or more computing devices 150 in the computing device cluster may also store partial instructions for executing the method for data migration. In other words, the combination of one or more computing devices 150 may jointly execute the instructions for executing the method for data migration.

[0264] It should be noted that the memory 1506 in different computing devices 150 in the computing device cluster can store different instructions, which are respectively used to execute part of the functions of the device for data migration. That is, the instructions stored in the memory 1506 in different computing devices 150 can implement the functions of one or more modules in the receiving module 1301 and the processing module 1302.

[0265] In some possible implementations, one or more computing devices in the computing device cluster may be connected via a network, which may be a wide area network or a local area network. Fig.17 A possible implementation is shown. Fig.17 As shown, two computing devices 150A and 150B are connected via a network. Specifically, the network is connected via a communication interface in each computing device. In this type of possible implementation, the memory 106 in the computing device 150A stores instructions for executing the functions of the receiving module 1301. At the same time, the memory 106 in the computing device 150B stores instructions for executing the functions of the processing module 1302.

[0266] Fig.17 The connection mode between the computing device clusters shown may be based on the consideration that the data migration method provided in the present application requires a large amount of data storage and processing, and therefore it is considered to hand over the functions implemented by the processing module 1302 to the computing device 150B for execution.

[0267] It should be understood that Fig.17 The functionality of computing device 150A shown in FIG. 1 may also be performed by multiple computing devices 150. Similarly, the functionality of computing device 150B may also be performed by multiple computing devices 150.

[0268] The present application embodiment also provides another computing device cluster. The connection relationship between the computing devices in the computing device cluster can be similar to that of Fig.16 The connection mode of the computing device cluster is different in that the memory 1506 in one or more computing devices 150 in the computing device cluster may store the same instructions for executing the method for data migration.

[0269] In some possible implementations, the memory 1506 of one or more computing devices 150 in the computing device cluster may also store partial instructions for executing the method for data migration. In other words, the combination of one or more computing devices 150 may jointly execute the instructions for executing the method for data migration.

[0270] The embodiment of the present application also provides a computer program product including instructions. The computer program product may be software or a program product including instructions that can be run on a computing device or stored in any available medium. When the computer program product is run on at least one computing device, the at least one computing device is caused to perform a method for data migration, or a method for data migration.

[0271] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by the computing device or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk). The computer-readable storage medium includes instructions that instruct the computing device to perform a method for data migration, or instruct the computing device to perform a method for data migration.

[0272] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the protection scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for data migration, characterized in that: Applied to the destination host, the method comprises: Receive and store stock data from the source host; Obtaining a cutover instruction, where the cutover instruction is used to instruct to run a target service, where the target service is a service running on a source host; In response to the cutover instruction, running the target service; After running the target service, obtaining incremental information from the source host, the incremental information is used to indicate at least one incremental data block, the incremental data block being a data block in which data has been changed after data in the data block has been migrated to the destination host; According to the incremental information, the data in each incremental data block is obtained from the source host, and the data in the incremental data block is stored.

2. The method according to claim 1, characterized in that The incremental information includes: migration information of each incremental data block, the migration information is first information or second information, the first information is used to indicate that the data in the incremental data block has not been migrated to the destination host, and the second information is used to indicate that the data in the incremental data block has been migrated to the destination host; After storing the data in the incremental data block, the method further includes: The migration information corresponding to the incremental data block that has been migrated to the destination host is updated to the second information.

3. The method according to claim 1 or 2, characterized in that: Running the target business includes: Obtaining a service request, where the service request is used to instruct reading and writing data; If the service request is used to instruct to read data, determining to read data from the destination host or the source host according to the current incremental information; If the service request is used to indicate writing data in a first data block, then based on the current incremental information, it is determined to write data in a second data block, where the second data block is a data block in the destination host except for the migration information which is the first information; wherein the second data block is different from the first data block, or the second data block is the same as the first data block.

4. The method according to claim 3, characterized in that Determining to read data from the destination host or the source host according to the current incremental information includes: If the migration information of the third data block in the current incremental information is the first information, then reading data in the third data block from the source host, the third data block being the data block indicated to be read by the service request; If the migration information of the third data block in the current incremental information is the second information, the data in the third data block is read from the destination host.

5. The method according to claim 4, characterized in that After reading the data in the third data block from the source host, the method further includes: The data in the third data block read from the source host is stored, and the migration information of the third data block is updated to the second information.

6. The method according to any one of claims 3 to 5, characterized in that: If the migration information of the first data block in the current incremental information is the first information, the second data block is different from the first data block, and the second data block is the data block in the destination host except the data block whose migration information is the first information; If the migration information of the first data block in the current incremental information is the second information, then the second data block is the same as the first data block.

7. The method according to any one of claims 1 to 6, characterized in that The step of running the target service in response to the cutover instruction includes: Starting a target driver, wherein the target driver is used to read and write data; Performing read and write operations on the target service through the target driver; Storing the data in the incremental data block includes: The data in each of the incremental data blocks read from the source host is written to the destination host through the target drive.

8. The method according to claim 7, characterized in that The stock data includes: the target driver and / or the migration application; or the target driver and / or the migration application are deployed on the destination host.

9. The method according to any one of claims 1 to 8, characterized in that Receiving the stock data from the source host includes: Receiving the stock data from the source host through a proxy object, wherein the proxy object is preset with a first operating system; The proxy object is a proxy image deployed on the destination host, or the proxy object is a proxy server.

10. The method according to claim 9, characterized in that The stock data also includes: a second operating system of the source host; The proxy object is a proxy image deployed on the destination host. Before obtaining the cutover instruction, the method further includes: When the migration of the stock data is completed, the proxy image is uninstalled, and the second operating system in the destination host is restarted.

11. A method for data migration, characterized in that: Applied to a source host, the method comprises: Obtaining a migration instruction, wherein the migration instruction is used to instruct to migrate the data in each data block in the source host to the destination host; In response to the migration instruction, sending the stock data to the destination host; Generate incremental information, the incremental information is used to indicate at least one incremental data block, the incremental data block is a data block in which data has been changed after data in the data block has been migrated to the destination host; When the migration of the stock data is completed, obtaining a service stop instruction, and stopping the target service in response to the service stop instruction; receiving an incremental synchronization request from the destination host, wherein the incremental synchronization request is used to request to obtain data in the incremental data block; The data in the incremental data block is sent to the destination host.

12. The method according to claim 11, characterized in that The stock data includes: a target driver and / or a migration application; or, the target driver and / or the migration application is deployed on the destination host.

13. A data migration device, characterized in that: Applied to a destination host, the device comprises: A receiving module, used for receiving and storing stock data from a source host; A processing module, used for obtaining a cutover instruction, wherein the cutover instruction is used for instructing to run a target service, wherein the target service is a service running on a source host; The processing module is further configured to run the target service in response to the cutover instruction; The receiving module is further used to obtain incremental information from the source host after running the target service, wherein the incremental information is used to indicate at least one incremental data block, and the incremental data block is a data block in which data has been changed after the data in the data block has been migrated to the destination host; The processing module is further configured to obtain data in each of the incremental data blocks from the source host according to the incremental information, and store the data in the incremental data blocks.

14. The device according to claim 13, characterized in that The incremental information includes: migration information of each incremental data block, the migration information is first information or second information, the first information is used to indicate that the data in the incremental data block has not been migrated to the destination host, and the second information is used to indicate that the data in the incremental data block has been migrated to the destination host; The processing module is further configured to update the migration information corresponding to the incremental data block that has been migrated to the destination host to the second information.

15. The device according to claim 13 or 14, characterized in that The processing module is further used to obtain a service request, where the service request is used to instruct reading and writing data; The processing module is further configured to determine, if the service request is used to instruct to read data, whether to read data from the destination host or the source host according to the current incremental information; The processing module is also used to determine, if the service request is used to indicate writing data in a first data block, to write data in a second data block based on the current incremental information, wherein the second data block is a data block in the destination host except for the migration information which is the first information; wherein the second data block is different from the first data block, or the second data block is the same as the first data block.

16. The device according to claim 15, characterized in that The processing module is further configured to read data in the third data block from the source host if the migration information of the third data block in the current incremental information is the first information, the third data block being the data block indicated to be read by the service request; The processing module is further configured to read the data in the third data block from the destination host if the migration information of the third data block in the current incremental information is the second information.

17. The device according to claim 16, characterized in that The processing module is further configured to store the data in the third data block read from the source host, and update the migration information of the third data block to the second information.

18. The device according to any one of claims 15 to 17, characterized in that If the migration information of the first data block in the current incremental information is the first information, the second data block is different from the first data block, and the second data block is the data block in the destination host except the data block whose migration information is the first information; If the migration information of the first data block in the current incremental information is the second information, then the second data block is the same as the first data block.

19. The device according to any one of claims 13 to 18, characterized in that The processing module is further used to start a target driver, and the target driver is used to read and write data; The processing module is further used to perform read and write operations on the target service through the target driver; The processing module is further configured to write the data in each incremental data block read from the source host to the destination host through the target driver.

20. The device according to claim 19, characterized in that The stock data includes: the target driver and / or the migration application; or the target driver and / or the migration application are deployed on the destination host.

21. The device according to any one of claims 13 to 20, characterized in that Receiving the stock data from the source host includes: The processing module is further used to receive the stock data from the source host through a proxy object, wherein the proxy object is preset with a first operating system; The proxy object is a proxy image deployed on the destination host, or the proxy object is a proxy server.

22. The device according to claim 21, characterized in that The stock data also includes: a second operating system of the source host; The processing module is further configured to uninstall the proxy image and restart the second operating system in the destination host when the migration of the stock data is completed.

23. A data migration device, characterized in that: Applied to a source host, the device comprises: A processing module, used for obtaining a migration instruction, wherein the migration instruction is used for instructing to migrate the data in each data block in the source host to the destination host; A sending module, configured to send the stock data to the destination host in response to the migration instruction; The processing module is further used to generate incremental information, where the incremental information is used to indicate at least one incremental data block, where the incremental data block is a data block in which data has been changed after the data in the data block has been migrated to the destination host; The processing module is further configured to obtain a service stop instruction when the migration of the stock data is completed, and stop the target service in response to the service stop instruction; A receiving module, used for receiving an incremental synchronization request from the destination host, wherein the incremental synchronization request is used for requesting to obtain data in the incremental data block; The sending module is also used to send the data in the incremental data block to the destination host.

24. The device according to claim 23, characterized in that The stock data includes: a target driver and / or a migration application; or, the target driver and / or the migration application is deployed on the destination host.

25. A computing device cluster, characterized in that: comprising at least one computing device, each computing device comprising a processor and a memory; The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the method according to any one of claims 1 to 13.

26. A computer program product comprising instructions, characterized in that When the instructions are executed by a computing device cluster, the computing device cluster executes the method according to any one of claims 1 to 13.

27. A computer-readable storage medium, characterized in that: The method comprises computer program instructions. When the computer program instructions are executed by a computing device cluster, the computing device cluster performs the method according to any one of claims 1 to 13.