# openGauss-tools-onlineMigration **Repository Path**: dev-an/openGauss-tools-onlineMigration ## Basic Information - **Project Name**: openGauss-tools-onlineMigration - **Description**: No description available - **Primary Language**: Unknown - **License**: MulanPSL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 22 - **Created**: 2022-06-27 - **Last Updated**: 2022-06-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # OnlineMigration #### 介绍 OnlineMigration是基于[Debezium](https://debezium.io/)的在线迁移工具,当前只支持Oracle迁移到openGauss。 #### 编译 ``` mvn compile ``` #### 打包 ``` mvn package ``` 生成的jar包位于**target/**下。 #### 运行前准备 配置oracle、启动Kafka等运行前准备操作详见instruction目录下的[PREPARATION](instruction/PREPARATION.md) #### 如何运行 参数说明: ``` --write-scn: write scn captured in debezium snapshot mode. --schema: the schema want to migrate --from-beginning: consume the messages from beginning. --consumer-file-path: the application property file --help: print the help message ``` 读取做快照时的scn并写入到scn.txt ``` java -jar OnlineMigration-1.0-SNAPSHOT.jar --write-scn ``` 从topic起始端开始消费 ``` java -jar OnlineMigration-1.0-SNAPSHOT.jar --schema schema_name --from-beginning ``` 从上次消费的topic偏移量处继续消费 ``` java -jar OnlineMigration-1.0-SNAPSHOT.jar --schema schema_name ``` 配置参数可在resources/consummer_setting.properties中修改后重新编译,或者自己创建新的properties文件并作为命令行参数传递给程序 ``` cp src/main/resources/consumer_setting.properties ./my_consumer_setting.properties # 修改my_consumer_setting.properties中的相关配置参数,然后启动 java -jar OnlineMigration-1.0-SNAPSHOT.jar --schema schema_name --from-beginning --consumer-file-path my_consumer_setting.properties ``` #### 如何结束 按CTRL+C结束即可。