A software migration method based on domestic operating system
By simulating the new server environment in the old server and performing multiple tests, the problems of data loss and system crash in server software migration are solved, and a stable and efficient software migration process is achieved.
Patent Information
- Application Number
- CN202310022233.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-07
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2043-01-07
AI Technical Summary
When upgrading servers, the software migration process in the prior art can easily lead to data loss and system crashes, and the new server may not be suitable for use, causing losses.
Simulate the operating environment of the new server in the old server, conduct multiple tests and adjustments, including virtual area establishment, source code modification and data migration, and ensure stability before actual migration.
It avoids time waste and data loss caused by direct migration. Through multiple tests and data patching, the new server can be operated stably and reduces the risk of loss.
Smart Images

Figure CN116009957B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of software migration, and in particular to a software migration method based on a domestic operating system. Background Art
[0002] Among domestic operating systems, such as UOS, Deepin, UbuntuKylin, NeoKylin, StartOS, and Puhua Linux, most of these systems are secondary developed operating systems based on Linux.
[0003] Compared with commercial Windows systems, Linux is an open source operating system. ① It has the right to access the source code and change the code according to user needs. Even under modern desktop environments and operating system functions, Linux runs faster. ② Linux distributions do not collect user data. ③ In Linux, applications can be suspended and killed through the x kill command. ④ Linux can support more free software.
[0004] Because of these features, Linux allows users to access the kernel's source code and modify it to their needs, achieving a high degree of customization. The advantage is that bugs in the operating system are quickly fixed, but the disadvantage is that developers can exploit any weaknesses they discover.
[0005] In Linux, a GPL-licensed operating system, users are free to modify the software, reuse it in any number of systems, and even sell the modified version. Linux has built-in functionality to stop at different run levels, so if someone encounters a problem, we can try working with both the command line and the GUI.
[0006] With the rapid development of the internet, network hardware is constantly being replaced and upgraded. Older servers often fail to keep up with the pace of network development. Consequently, older servers require replacement. When upgrading servers, the software from the old server must be migrated to the new one. This process involves migrating the software from the old server to the new one. This massive data volume often results in data loss. After migration, the software may not adapt to the new server, leading to sudden system crashes and significant losses.
[0007] To this end, we propose a software migration method based on domestic operating systems. Summary of the Invention
[0008] The purpose of the present disclosure is to propose a software migration method based on a domestic operating system. First, the operating environment of a new server is simulated in the old server, and the simulated operation is performed in the old server. Before purchasing a new server, the simulation can be performed according to the configuration of the new server to avoid rashly purchasing a new server that is not suitable for use and causing losses; and simulation selection can be performed among multiple new servers. After three tests in the steps, the time waste caused by direct transfer is avoided. Once the new server cannot run due to unchangeable factors during the test, the loss can be stopped in time to save time.
[0009] To achieve this goal, the present disclosure adopts the following technical solutions:
[0010] A software migration method based on a domestic operating system includes the following steps:
[0011] S1. Confirm the scope of the migration, including the old and new domains to be replaced, a list of all interfaces for the domain to be replaced, and whether the migrated domains include interfaces that bypass firewalls.
[0012] S2. Stop services and perform backup. Stop services on the old server and back up the critical data and programs on the old server that are within the scope of the migration.
[0013] S3, simulation, establishes a virtual zone based on the new server on the old server, which can simulate the operating environment of the new server;
[0014] S4. Copy and modify the source code: copy the source code of the key program to the virtual area, and add, delete, or adapt the source code according to the configuration and parameters of the new server;
[0015] S5. One test: run the modified source code, then directly call the data in the old server for testing. Once the test is stable, proceed to the next step.
[0016] S6. Migration: Connect the new and old servers via a data cable, then migrate the source code main program completed in the virtual zone to the new server and load and install it;
[0017] S7, Secondary test, run the source code main program in the new server, and call the data in the old server along the data connection line for testing. After the test is stable, proceed to the next step;
[0018] S8. Transfer data, confirm the data range to be transferred, and transfer the data in sequence;
[0019] S9, test three times, remove the data connection cable, run the new server, test the intranet service, and proceed to the next step after the test is stable;
[0020] S10. Encryption: encrypt the interfaces that need to go through the encryption wall; after encryption is completed, perform access permission test, and after the test is completed, complete the software migration.
[0021] Preferably, in S2, if sufficient conditions exist, all data and programs are backed up.
[0022] Preferably, in S3, at the beginning of establishing the virtual zone, the running memory of the old server needs to be estimated. When the key programs in the old server and the source code main program of the virtual zone are running at the same time, 30-40% of the CPU computing resources need to be reserved for comparison testing.
[0023] Preferably, in S5, if an unstable situation occurs during a test, steps S3, S4, and S5 are repeated according to the situation until the test can run stably.
[0024] Preferably, in S7, if instability occurs in the secondary test, the source code of the source code main program is directly added, deleted or adaptively modified in the new server, and then tested frequently.
[0025] Preferably, in S8, before data transfer, data needs to be compressed and packaged according to data conditions, and after data transfer, the data needs to be decompressed and released in sequence.
[0026] Preferably, in S9, when the new server is running, if instability occurs, the source code main program is added, deleted or adaptively modified according to the situation.
[0027] Preferably, when performing the intranet test in S9, the new server is accessed via the internal network, and targeted high-frequency access tests are performed based on the upgrade status of the old and new servers to test the service performance of the new server.
[0028] Preferably, the software migration process is recorded, and the unstable situations encountered during the first test, the second test, and the third test are compared and summarized. A script is set to record the test process and the correct method steps in the new server, which can be called for reference the next time the server software is transferred.
[0029] Preferably, after the migration is completed, the source code is encrypted on the new server.
[0030] The beneficial effects of the present disclosure are:
[0031] The present invention first simulates the operating environment of the new server in the old server and performs the simulated operation in the old server, thereby avoiding the waste of time and data loss caused by direct migration;
[0032] The present invention simulates the operating environment of a new server in an old server. Before purchasing a new server, the user can simulate the configuration of the new server first, thus avoiding the loss caused by rashly purchasing an unsuitable new server. The invention can also simulate and select from multiple new servers.
[0033] The present invention performs three tests in the steps, namely, a test before the transfer, a test during the transfer, and a test after the transfer. This avoids the time waste caused by direct transfer. If the new server cannot run due to unchangeable factors during the test, the loss can be stopped in time, saving time.
[0034] The present invention adopts calling data test in all three tests. The testing method is accurate and efficient. Once data loss occurs during the process, it can be discovered and repaired in time. Moreover, data transfer is performed only after ensuring that the source code main program is correct, which reduces the probability of data loss. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 This is a flowchart of Example 1 of a software migration method based on a domestic operating system of the present invention;
[0036] Figure 2 This is a flow chart of Example 2 of a software migration method based on a domestic operating system of the present invention;
[0037] Figure 3 This is a flowchart of Example 3 of a software migration method based on a domestic operating system of the present invention;
[0038] Figure 4 This is a flowchart of Example 4 of a software migration method based on a domestic operating system of the present invention;
[0039] Figure 5 This is a flowchart of Example 5 of a software migration method based on a domestic operating system of the present invention. DETAILED DESCRIPTION
[0040] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0041] Example 1
[0042] A software migration method based on a domestic operating system includes the following steps:
[0043] S1. Confirm the scope of the migration, including the old and new domains to be replaced, a list of all interfaces for the domain to be replaced, and whether the migrated domains include interfaces that bypass firewalls.
[0044] S2. Stop services and perform backup. Stop services on the old server and back up the critical data and programs on the old server that are within the scope of the migration.
[0045] S3, simulation, establishes a virtual zone based on the new server on the old server, which can simulate the operating environment of the new server;
[0046] S4. Copy and modify the source code: copy the source code of the key program to the virtual area, and add, delete, or adapt the source code according to the configuration and parameters of the new server;
[0047] S5. One test: run the modified source code, then directly call the data in the old server for testing. Once the test is stable, proceed to the next step.
[0048] S6. Migration: Connect the new and old servers via a data cable, then migrate the source code main program completed in the virtual zone to the new server and load and install it;
[0049] S7, Secondary test, run the source code main program in the new server, and call the data in the old server along the data connection line for testing. After the test is stable, proceed to the next step;
[0050] S8. Transfer data, confirm the data range to be transferred, and transfer the data in sequence;
[0051] S9, test three times, remove the data connection cable, run the new server, test the intranet service, and proceed to the next step after the test is stable;
[0052] S10. Encryption: encrypt the interfaces that need to go through the encryption wall; after encryption is completed, perform access permission test, and after the test is completed, complete the software migration.
[0053] After the migration is complete, encrypt the source code on the new server.
[0054] Example 2
[0055] A software migration method based on a domestic operating system includes the following steps:
[0056] S1. Confirm the scope of the migration, including the old and new domains to be replaced, a list of all interfaces for the domain to be replaced, and whether the migrated domains include interfaces that bypass firewalls.
[0057] S2. Stop services and perform backup. Stop services on the old server and back up all data and programs on the old server that have been confirmed to be within the migration scope.
[0058] S3. Simulation: Create a virtual zone based on the new server on the old server. This virtual zone can simulate the operating environment of the new server. When establishing the virtual zone, it is necessary to estimate the operating memory of the old server. When the key programs in the old server and the main source code program in the virtual zone are running simultaneously, it is necessary to reserve 30-40% of the CPU computing resources for comparison testing.
[0059] S4. Copy and modify the source code: copy the source code of the key program to the virtual area, and add, delete, or adapt the source code according to the configuration and parameters of the new server;
[0060] S5: Run a test, run the modified source code, and then directly call the data in the old server for testing. After the test is stable, proceed to the next step. If instability occurs during a test, repeat S3, S4, and S5 according to the situation until the test can run stably.
[0061] S6. Migration: Connect the new and old servers via a data cable, then migrate the source code main program completed in the virtual zone to the new server and load and install it;
[0062] S7, Secondary test, run the source code main program in the new server, and call the data in the old server along the data connection line for testing. After the test is stable, proceed to the next step;
[0063] S8. Transfer data. Confirm the data range to be transferred and transfer the data in sequence. Before transferring the data, it is necessary to subpackage and compress the data according to the data situation. After the data is transferred, decompress and release the data in sequence.
[0064] S9, test three times, remove the data connection cable, run the new server, test the intranet service, and proceed to the next step after the test is stable;
[0065] S10. Encryption: encrypt the interfaces that need to go through the encryption wall; after encryption is completed, perform access permission test, and after the test is completed, complete the software migration.
[0066] After the migration is complete, encrypt the source code on the new server.
[0067] Example 3
[0068] Different from the embodiments 1 and 2, in S7, if instability occurs in the secondary test, the source code of the source code main program is directly added, deleted or adaptively modified in the new server, and then tested frequently.
[0069] Example 4
[0070] Unlike Examples 1, 2, and 3, in S9, if instability occurs when running the new server, the source code main program is added, deleted, or adaptively modified accordingly. During the intranet test in S9, the new server is accessed via the internal network. At the same time, targeted high-frequency access tests are performed based on the upgrade status of the old and new servers to test the service performance of the new server.
[0071] Example 5
[0072] The difference from Examples 1-4 is that the software migration process is recorded, and the unstable situations encountered during the first test, the second test, and the third test are compared and summarized. A script program is set to record the test process and the correct method steps in the new server, which can be called for reference the next time the server software is transferred.
[0073] In summary:
[0074] The present invention first simulates the operating environment of the new server in the old server and performs a simulated operation in the old server, thereby avoiding the waste of time and data loss caused by direct migration. Before purchasing a new server, simulation can be performed according to the configuration of the new server to avoid rashly purchasing a new server that is not suitable for use and causing losses. Simulation selection can also be performed among multiple new servers. After three tests in the steps, namely, a test before migration, a test during migration, and a test after migration, this method avoids the waste of time caused by direct migration. If the new server cannot run due to unchangeable factors during the test, the loss can be stopped in time, saving time. In all three tests, call data testing is used, which is an accurate and efficient testing method. If data loss occurs during the process, it can be discovered and repaired in time. After ensuring that the source code main program is correct, data migration is performed, reducing the probability of data loss.
[0075] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.
Claims
1. A software migration method based on a domestic operating system, characterized in that: The following steps are involved: S1. Confirm the scope of the migration, including the old and new domains to be replaced, a list of all interfaces for the domain to be replaced, and whether the migrated domains include interfaces that bypass firewalls. S2. Stop services and perform backup. Stop services on the old server and back up the critical data and programs on the old server that are within the scope of the migration. S3, simulation, establishes a virtual zone based on the new server on the old server, which can simulate the operating environment of the new server; S4. Copy and modify the source code: copy the source code of the key program to the virtual area, and add, delete, or adapt the source code according to the configuration and parameters of the new server; S5. One test: run the modified source code, then directly call the data in the old server for testing. Once the test is stable, proceed to the next step. S6. Migration: Connect the new and old servers via a data cable, then migrate the source code main program completed in the virtual zone to the new server and load and install it; S7, Secondary test, run the source code main program in the new server, and call the data in the old server along the data connection line for testing. After the test is stable, proceed to the next step; S8. Transfer data, confirm the data range to be transferred, and transfer the data in sequence; S9, test three times, remove the data connection cable, run the new server, test the intranet service, and proceed to the next step after the test is stable; S10. Encryption: encrypt the interfaces that need to go through the encryption wall; after encryption is completed, perform access permission test, and after the test is completed, complete the software migration.
2. The software migration method based on a domestic operating system according to claim 1, characterized in that: In S2, if sufficient conditions exist, all data and programs are backed up.
3. The software migration method based on a domestic operating system according to claim 2, characterized in that: In S3, when the virtual zone is first established, the running memory of the old server needs to be estimated. When the key programs in the old server and the source code main program of the virtual zone are running at the same time, 30-40% of the CPU computing resources need to be reserved for comparison testing.
4. The software migration method based on a domestic operating system according to claim 3, characterized in that: In S5, if an unstable situation occurs during a test, repeat steps S3, S4, and S5 according to the situation until the test can run stably.
5. The software migration method based on a domestic operating system according to claim 1, characterized in that: In S7, if instability occurs during secondary testing, the source code of the main program is directly added, deleted, or adaptively modified in the new server, and then tested frequently.
6. The software migration method based on a domestic operating system according to claim 1, characterized in that: In S8, before data transfer, it is necessary to sub-package and compress the data according to the data situation, and then decompress and release the data in sequence after the data transfer.
7. The software migration method based on a domestic operating system according to claim 6, characterized in that: In S9, when running a new server, if instability occurs, the source code main program will be added, deleted, or adaptively modified according to the situation.
8. The software migration method based on a domestic operating system according to claim 1, characterized in that: When conducting intranet testing in S9, the new server is accessed through the internal network. At the same time, targeted high-frequency access tests are conducted based on the upgrade status of the new and old servers to test the service performance of the new server.
9. The software migration method based on a domestic operating system according to claim 1, characterized in that: Record the software migration process, compare and summarize the unstable situations encountered during the first, second and third tests, set up a script to record the test process and correct method steps to the new server, and call it for reference the next time the server software is transferred.
10. The software migration method based on a domestic operating system according to claim 1, characterized in that: After the migration is complete, encrypt the source code on the new server.
Citation Information
Patent Citations
Android running environment realization method based on non-virtualized system architecture
CN108762815A
Migration adaptation method and device based on domestic information creation software and hardware platform, and equipment
CN112463417A