数据库迁移工具DataX-Migration
DataX-Migration **[

](https://github.com/Jawf/DataX-Migration)**
DataX-Migration is Yxt (Yunxuetang) Full Database Migration Tool based on Alibaba DataX 3.0. Support Database Migration among Mysql, Oracle, SqlServer, PostgreSql. And support where condition when migration.
DataX-Migration 是云学堂开源的基于阿里巴巴DataX 3.0的数据库迁移工具。支持对Mysql,Oracle,SqlServer, PostgreSql之间的相互迁移, 支持迁移时带where查询条件,并生成迁移数据报表。
DataX是什么?
DataX 是阿里巴巴集团内广为采用的离线数据同步工具/平台,在支持MySQL、Oracle、SqlServer等主流数据库以及HDFS/Hive等大数据存储系统的异构数据源间实现了高效的数据同步功能。该平台负责全集团范围内所有大数据项目的离线同步工作,并已稳定运行六年之久。目前该平台日处理作业达8万组以上,并累计 daily data transfer 超过300TB.

有关更为详尽的说明,请参考此页面:https://github.com/alibaba/DataX/wiki/DataX-Introduction
为什么还需要DataX-Migration
DataX致力于实现数据同步功能,并采用脚本驱动和高度可配置的方式。通过一系列独立的脚本任务完成单表数据的同步操作过程。为了更高效地完成整个数据库的迁移工作,我们对DataX进行了封装优化。从而实现了整个数据库的无缝迁移目标。
DataX-Migration的功能
基于用户提供的数据库表tables查询条件参数设置生成对应的单独DataX json配置文件,并通过运行相应的脚本流程完成数据迁移操作的同时自动生成相关cvs报表;当遇到大量数据库表处理时建议采用资源分配策略将任务划分为多线程任务以提升整体数据迁移效率

Support Data Channels
DataX已实现了较为完善的插件体系配置功能,在主流数据库技术架构上已成功集成RDBMS数据库服务、NOSQL存储引擎以及大数据计算平台。当前支持的数据可通过下图了解更多信息,请点击DataX数据源参考指南查看详细信息
| 类型 | 数据源 | Reader(读) | Writer(写) |
|---|---|---|---|
| RDBMS 关系型数据库 | Mysql | √ | √ |
| Oracle | √ | √ | |
| SqlServer | √ | √ | |
| Postgresql | √ | √ | |
| 达梦 | √ | √ | |
| 阿里云数仓数据存储 | ODPS | √ | √ |
| ADS | √ | ||
| OSS | √ | √ | |
| OCS | √ | √ | |
| NoSQL数据存储 | OTS | √ | √ |
| Hbase0.94 | √ | √ | |
| Hbase1.1 | √ | √ | |
| MongoDB | √ | √ | |
| 无结构化数据存储 | TxtFile | √ | √ |
| FTP | √ | √ | |
| HDFS | √ | √ |
Datax-Migration当前在直接应用关系型数据库方面无明显障碍或挑战;针对非关系型数据库,则需进行必要的验证工作。
Quick Start
download [DataX可以运行的bin下载地址](http://datax-opensource.oss-cn-hangzhou.aliyuncs.com/datax.tar.gz)
2. git clone https://github.com/Jawf/datax-migration.git
3. mvn clean install
4. copy target/datax-migration.jar and target/datax-migration_lib to datax home directory.
5. open the datax-migration.jar, edit the config.properties, config migration db information source/target url, dbname, user, password, etc.
6. open the datax-migration.jar, edit the job/jobtemplate.json accordingly, default it migration from mysqlreader->mysqlwriter
7. java -jar datax-migration.jar
Special Function
java -jar datax-migration.jar json #Only generate json files config for all tables.
java -jar datax-migration.jar report #Only generate cvs report to view migration status.
java -jar datax-migration.jar run #Only run the migration and generate the cvs reports. Before run this, need generate json config files for all tables first.
详细信息**[查看github

