Batch Importing Source Components
System Migration allows batch importing source components and manually adding component information. If you perform a batch import, you can run the script to obtain the component information on the source node.
Prerequisites
- You have obtained the node information collection script (devkit_disk_scan.sh).
On the New Project page, click Batch Import Source Components and obtain the node information collection script as prompted.
- During a scan, the available space on the partition where the output directory resides is checked. To prevent the drive from running out of space, the available space must be at least 2 GB or 5% of the total space, whichever is smaller.
- By default, the tool scans all middleware that supports the migration path. If you need to migrate Java middleware, add it following instructions in Configuring the General Middleware Migration Process.
Procedure
- Use an
SSH tool to remotely log in to the source node (x86) as the root user and upload the obtained node information collection script to the user-defined directory. Then go to the directory. - (Optional) To add Java middleware, configure the trustlist accordingly.
- Open the devkit_disk_scan.sh script.
vi devkit_disk_scan.sh
- Press i to enter the insert mode and check the DEFAULT_PACKAGE_TARS_CSV configuration item.
If the Java middleware already exists in DEFAULT_PACKAGE_TARS_CSV, you do not need to modify the configuration item. If it does not exist, add it with a commas (,) and note that the name is case sensitive.
476 # Trustlist: components to be packaged (CSV) 477 : "${DEFAULT_PACKAGE_TARS_CSV:=Redis,Nginx,Tomcat,Elasticsearch,Resin,Nacos}" 478 DEFAULT_PACKAGE_TARS_CSV="$(printf %s "$DEFAULT_PACKAGE_TARS_CSV" | tr -d '[:space:]')" 479 export DEFAULT_PACKAGE_TARS_CSV 480 481 : "${PACK_BLACKLIST_CSV:=/usr/bin,/usr/local/bin,/usr/share/java,/usr/sbin}" 482 PACK_BLACKLIST_CSV="$(printf %s "$PACK_BLACKLIST_CSV" | tr -d '[:space:]')" 483 export PACK_BLACKLIST_CSV - Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
- Open the devkit_disk_scan.sh script.
- Run the following command to obtain the source node component information:
bash devkit_disk_scan.sh
If the command output contains the following information, the collection is complete. Obtain the compressed package devkit-component-xx.xx.xx.xx-Timestamp.tar.gz.
[2025-10-31 16:31:13] [INFO] Generated a package: /home/devkit-component-package/result/devkit-component-xx.xx.xx.xx-20251031162830.tar.gz (sha256=692af1c46b7528cecc56ed8dcd54629b0a0224d6127c2b1e846b33a2e5c9772b size=487856342) [2025-10-31 16:31:13] [INFO] Packaging completed.
Table 1 Parameter description Parameter
Description
-h
Displays help information.
-R <path>
Scans the specified directory for middleware, databases, and applications, and packages the source components that support migration. Only one directory can be specified and a relative path is supported. The default value is the root directory /.
Example: -R /home
NOTE:By default the root directory is scanned. A scan may take a long time. Please wait.
-F <path>
Packages the specified directory. During middleware migration, some service configurations or extra data directories may be scattered in non-standard paths (such as /data/app_conf/) and cannot be identified as middleware components. You can use this specified directory for packaging. During the migration, the package is copied to the target environment. Use commas (,) to separate multiple directories. Relative paths are supported.
-O <out_path>
Directory for storing scan results, which defaults to /home. Scan reports are automatically stored in <out_path>/devkit-component-package.
Example: -O /data
-p <num>
Maximum number of processes to be scanned, which defaults to 1.
Example: -p 8
-g <DEBUG|INFO>
Log level, which defaults to INFO.
- DEBUG
- INFO
-N
Static scan (not to run the --version command to identify the version). This option is enabled by default.
-z
Number of concurrent processes for packaging files, which defaults to 1.
Example: -z 2
-b
Background script, which can be replaced with the nohup command.
-L <file>
Background redirection log file, which defaults to <out_path>/devkit-component-package/devkit-component-<IP_address>/scan.log.
-P <file>
Writes the background process ID to the file. It is recommended that this option be used together with the -b option. The file defaults to <out_path>/devkit-component-package/devkit-component-<IP_address>/devkit-scan.pid.
-S
Indicates that you can query the running status (depending on the PID file) in the background.
- If you use the -P option for the scan, specify -P to obtain the PID file.
- If you use the -O option but not -P for the scan, specify -O to obtain the PID file.
-K
Stops running in the background (depending on the PID file).
- If you use the -P option for the scan, specify -P to obtain the PID file.
- If you use the -O option but not -P for the scan, specify -O to obtain the PID file.